Replicate Version control for machine learning

This is the reference for the Replicate command-line interface. You can also see this in the terminal by running replicate --help or replicate command --help.

To install the command-line interface, see the installation instructions.

Commands

replicate analytics

The Replicate CLI sends anonymous analytics about commands you run.

The following data is sent on each command line invokation:

  • A random token for the machine (e.g. "9f3027bb-0eb8-917d-e5bf-c6c1bdb1fd0a")
  • The subcommand you ran, without any options or arguments (e.g. "replicate run", not "replicate run python secretproject.py")
  • The Replicate version (e.g. "1.0.0")
  • Your CPU architecture (e.g. "amd64")
  • Your operating system (e.g. "linux")

To learn more, please refer to https://replicate.ai/docs/learn/analytics

These analytics really help us, and we'd really appreciate it if you left it on. But, if you want to opt out, you can run this command:

replicate analytics off

Usage

replicate analytics <on|off> [flags]

Flags

-h, --help help for analytics
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate checkout

Copy files from an experiment or checkpoint into the project directory

Usage

replicate checkout <experiment or checkpoint ID> [flags]

Flags

-f, --force Force checkout without prompt, even if the directory is not empty
-h, --help help for checkout
-o, --output-directory string Output directory (defaults to working directory or directory with replicate.yaml in it)
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate diff

Compare two experiments or checkpoints.

If an experiment ID is passed, it will pick the best checkpoint from that experiment. If a primary metric is not defined in replicate.yaml, it will use the latest checkpoint.

Usage

replicate diff <ID> <ID> [flags]

Flags

-h, --help help for diff
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate feedback

Submit feedback to the team!

Usage

replicate feedback [flags]

Flags

-h, --help help for feedback
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate ls

List experiments in this project

Usage

replicate ls [flags]

Examples

List all experiments in the current project:
$ replicate ls
List experiments that have run for 50 steps or less:
$ replicate ls --filter "step <= 50"
List experiments where the parameter "optimizer" is "adam" and
the best "accuracy" metric is greater than 0.8:
$ replicate ls --filter "optimizer = adam" --filter "accuracy > 0.8"
Sort all stopped experiments by the metric "val_loss":
$ replicate ls --sort "val_loss" --filter "status = stopped"

Flags

--all Output all params and metrics. Default: only params/metrics that differ
-f, --filter stringArray Filters (format: "<name> <operator> <value>")
-h, --help help for ls
--json Print output in JSON format
-q, --quiet Only print experiment IDs
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
-s, --sort string Sort key. Suffix with '-desc' for descending sort, e.g. --sort=started-desc (default "started")
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate ps

List running experiments in this project

Usage

replicate ps [flags]

Flags

--all Output all params and metrics. Default: only params/metrics that differ
-f, --filter stringArray Filters (format: "<name> <operator> <value>")
-h, --help help for ps
--json Print output in JSON format
-q, --quiet Only print experiment IDs
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
-s, --sort string Sort key. Suffix with '-desc' for descending sort, e.g. --sort=started-desc (default "started")
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate rm

Remove experiments or checkpoints.

To remove experiments or checkpoints, pass any number of IDs (or prefixes).

Usage

replicate rm <experiment or checkpoint ID> [experiment or checkpoint ID...] [flags]

Examples

Delete an experiment and its checkpoints
(where a1b2c3d4 is an experiment ID):
replicate rm a1b2c3d4
Delete all experiments where the metric "val_accuracy" is less
than 0.2 at the best checkpoints:
replicate rm $(replicate ls -q --filter "val_accuracy < 0.2")

Flags

-f, --force Force delete without interactive prompt
-h, --help help for rm
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output

replicate show

View information about an experiment or checkpoint

Usage

replicate show <experiment or checkpoint ID> [flags]

Flags

-h, --help help for show
--json Print output in JSON format
-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)
--color Display color in output (default true)
-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml
-v, --verbose Verbose output