Skip to main content

Cool package for robust AI

Project description

Installation

Robbytorch requires Pytorch, however it's not specified in the dependencies - we recommend installing Pytorch manually via conda and only later installing Robbytorch by pip. Pytorch has to be in version 1.6 or higher.

Use your conda env or create a new one:

conda create --name <ENV NAME> python=3.8 pip
conda activate <ENV NAME>

Install Pytorch. If you have older drivers for GPU you may require older version of CUDA, i.e.:

conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch -c conda-forge

or even older Pytorch version:

conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch

Then run:

pip install robbytorch

Usage

The basics of the Robbytorch library are explained in the ipython/RobbytorchTutorial.ipynb juputer notebook.

TODO

  • Streamline logging - currently we need to pass arguments to MLFLowWriter at init which we want to do outside of the Trainer#train_model function to keep reference to the Writer instance. We'd like to invent better flow that would allow us to pass config dict just once;
  • Create helper for iterating over rows and cols and printing tensor:
diffs = show - show.roll(shifts=1, dims=0)

cols, rows = 3, 6
for i in range(rows):
    curr = (show[i*cols:(i+1)*cols])
    diff = vis_grad(diffs[i*cols:(i+1)*cols])
    robby.get_image_table(curr, diff, size=(10,10))

robby.widen_outputs()

Packaging

Development mode

Run from this repository's root dir:

python setup.py develop

Now you can use the package as if it was installed by pip.

When you’re done with a given development task, you can remove the project source from a staging area using:

python setup.py develop --uninstall

Creating python package

Use this tutorial. In short:

  1. put your source files into src/<PACKAGE NAME>/ dir and create files: src/<PACKAGE NAME>/__init__.py, setup.py, pyproject.toml, README.md and LICENSE (also optionally an empty test dir)
  2. install required packages:
python3 -m pip install --upgrade twine build
  1. build the package, i.e. run from root folder:
python3 -m build
  1. upload the package:
python3 -m twine upload dist/*

In order to perform the last step you need to have a https://pypi.org/ account and create the API token, which could be conveniently placed in $HOME/.pypirc:

[pypi]
  username = __token__
  password = pypi-<API TOKEN>

Warnings:

If you update the package you should increment the version param in setup.py and empty the dist dir.

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

robbytorch-0.3.5.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

robbytorch-0.3.5-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file robbytorch-0.3.5.tar.gz.

File metadata

  • Download URL: robbytorch-0.3.5.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for robbytorch-0.3.5.tar.gz
Algorithm Hash digest
SHA256 1140eb31b068924257400fb812dbfe44f42ada4c620da1a7e8b153e872b19c81
MD5 d1dcc12c9d850634c5e7a13f9941517c
BLAKE2b-256 1e60dd3d248019e19dda2b6d57e6a8f7252defc273a0be791f322209ce6dc00e

See more details on using hashes here.

File details

Details for the file robbytorch-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: robbytorch-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for robbytorch-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b9e4dd4ab29060c726aa9cab778f657ba4f3f01d63625ea8498c349ee3658ac2
MD5 150d1f2d3c8538d5c821d6cd76784c8a
BLAKE2b-256 d87f9c41ad062f6601e9b160b51e81df70d8baf9d188aaa86028c1cfd41237ad

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