Skip to content

This is a tool for finding non-deterministic functions in your pytorch code.

License

Notifications You must be signed in to change notification settings

minnervva/torchdetscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torchdet

A linter for deep learning non-determinism, randomness and reproducibility with applications to scientific computing and simulation.

Installation

From your terminal, clone this repository and move into the project directory as shown here:

git clone https://github.com/minnervva/torchdetscan.git
cd torchdetscan

Install Python from https://www.python.org or by using various other methods. After installing Python, create and activate a virtual environment within the project directory as follows:

python -m venv .venv
source .venv/bin/activate

Install the torchdet package and its dependencies into the virtual environment:

pip install .

Check installation by running the torchdet --help command. This should output the following text in your terminal:

usage: torchdet [-h] [--verbose] {scan,test} ...

Find non-deterministic functions in your PyTorch code

options:
  -h, --help     show this help message and exit
  --verbose, -v  enable chatty output

subcommands:
  {scan,test}    valid subcommands
    scan         run the linter
    test         run the testing tool

Usage

Run the scan command line tool:

torchdet scan examples/pytorch_basic.py

Run the test command line tool:

torchdet test convolve2D

Use the --help option with each subcommand to see more information about that command.