Skip to content

CLI Reference

This page provides documentation for our command line tools.

stock

The stock CLI provides a git-like experience (whenever possible) to interact with the stock repository. It also means that the current working directory is where the stock repository would exist (like git 😊 ).

Usage:

stock [OPTIONS] COMMAND [ARGS]...

Options:

  --version  display current stockroom version

commit

It does a stock commit. Stock commit consists of two actions

  1. Make a hangar commit
  2. Update the head.stock file (git will track this file if you are using git)

Usage:

stock commit [OPTIONS]

Options:

  -m, --message TEXT  The commit message. If multiple arguments are provided,
                      each of them gets converted into a new line

import

Downloads and add a pytorch dataset (from torchvision, torchtext or torchaudio) to StockRoom. It creates the repo if it doesn't exist and loads the dataset into a repo for you

Usage:

stock import [OPTIONS] DATASET_NAME

Options:

  -d, --download-dir PATH  If you have the dataset downloaded in a non-default
                           path or want to download it to a non-default path,
                           pass it here

init

Init stockroom repository. This will create a .hangar directory and a head.stock file in your cwd. stock init would be triggered implicitly if you are making a stock repository by using stock import but in all other case, you'd need to initialize a stock repository to start operating on it with the python APIs

Usage:

stock init [OPTIONS]

Options:

  --username TEXT  Username of the user
  --email TEXT     Email address of the user
  --overwrite      overwrite a repository if it exists at the current path

liberate

Release the writer lock forcefully and make the repository available for writing.

Warning

If another process, that has the writer lock, is writing to the repo, releasing the lock leads to an exception in that process. Use it carefully

Usage:

stock liberate [OPTIONS]

list

Lists the items in the 3 shelves(Data, Model, Experiment) for the current stock head.

Usage:

stock list [OPTIONS]

Options:

  -d, --data        Flag to show the data shelf and show a summary of the data
  -m, --model       Flag to show the model shelf and list the models.
  -e, --experiment  Flag to show the tags and their values