Skip to main content

Learning to rank library

Project description

Vespa for Data Scientists

Motivation

This library contains application specific code related to data manipulation and analysis of different Vespa use cases. The Vespa python API is used to interact with Vespa applications from python for faster exploration.

The main goal of this space is to facilitate prototyping and experimentation for data scientists. Please visit Vespa sample apps for producuction-ready use cases and Vespa docs for in-depth Vespa documentation.

Install

Code to support and reproduce the usecases documented here can be found in the learntorank library.

Install via PyPI:

pip install learntorank

Development

All the code and content of this repo is created using nbdev by editting notebooks. We will give a summary below about the main points required to contribute, but we suggest going through nbdev tutorials to learn more.

Setting up environment

  1. Create and activate a virtual environment of your choice. We recommend pipenv.

    pipenv shell
    
  2. Install Jupyter Lab (or Jupyter Notebook if you prefer).

    pip3 install jupyterlab
    
  3. Create a new kernel for Jupyter that uses the virtual environment created at step 1.

    • Check where the current list of kernels is located with jupyter kernelspec list.
    • Copy one of the existing folder and rename it to learntorank.
    • Modify the kernel.json file that is inside the new folder to reflect the python3executable associated with your virtual env.
  4. Install nbdev library:

    pip3 install nbdev
    
  5. Install learntorank in development mode:

    pip3 install -e .[dev]
    

Most used nbdev commands

From your terminal:

  • nbdev_help: List all nbdev commands available.

  • nbdev_readme: Update README.md based on index.ipynb

  • Preview documentation while editing the notebooks:

    • nbdev_preview --port 3000
  • Workflow before pushing code:

    • nbdev_test --n_workers 2: Execute all the tests inside notebooks.
      • Tests can run in parallel but since we create Docker containers we suggest a low number of workers to preserve memory.
    • nbdev_export: Export code from notebooks to the python library.
    • nbdev_clean: Clean notebooks to avoid merge conflicts.
  • Publish library

    • nbdev_bump_version: Bump library version.
    • nbdev_pypi: Publish library to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learntorank-0.0.16.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

learntorank-0.0.16-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file learntorank-0.0.16.tar.gz.

File metadata

  • Download URL: learntorank-0.0.16.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for learntorank-0.0.16.tar.gz
Algorithm Hash digest
SHA256 be4ddf59cf2b75a5b675fc66195ca7e0885227c68f94a60db5087c8e52caa419
MD5 3291e9184077b6c9615a21759ce620eb
BLAKE2b-256 2de6b6863dd58467f807fcc4260ed26bcfadce5ded4cea2cef29ba0ccc8d37d3

See more details on using hashes here.

File details

Details for the file learntorank-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for learntorank-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 96048972cb763bf1768008525d5e79fd7767a6d48be222b33248598b7a1e7b56
MD5 9495af8d6d2cbe2dfb30f7bd30b0366f
BLAKE2b-256 467c0b0ca5eebd8ab8474c1688fdd3b3e36b94dff7a5f3b8fb55f83fe7ca4a06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page