Command Line Utility

The command line utility for datmo is to be used in tandem with the SDK and will typically be your first contact with the datmo system. If using Python, see Python SDK.

If you are working within a repository already, you will want to run the datmo init within your repository in order to create your datmo project.

From there, you can create snapshots or run tasks using either the SDK or the CLI. At any given point you can find out more about all of your snapshots using the datmo snapshot ls command and see the status of any of your tasks with the datmo task ls command.

Sessions are a way for you to group together tasks and snapshots, but are completely optional. For example, if you want to run a set of hyperparameter experiments modifying some subset of hyperparameters you might want to do them in a designated session. Then you might try another set of hyperparameter sweeps which you would like to group into another session. By default, you will always be in the “default” session unless otherwise specified.

You can delve through more of the commands and each of their parameters below to learn more about each entity and how you can create different versions of them. You can also look through the Getting Started section in the README.

usage: datmo [-h] {init,version,status,cleanup,session,snapshot,task} ...

commands

command Possible choices: init, version, status, cleanup, session, snapshot, task

Sub-commands:

init

initialize project

datmo init [-h] [--name NAME] [--description DESCRIPTION]

Named Arguments

--name
--description

version

datmo version

datmo version [-h]

status

project status

datmo status [-h]

cleanup

remove project

datmo cleanup [-h]

session

session module

datmo session [-h] {create,delete,ls,select} ...

subcommands

subcommand Possible choices: create, delete, ls, select

Sub-commands:

create

create session

datmo session create [-h] [--name NAME] [--current]
Named Arguments
--name, -m

session name

Default: “”

--current

boolean if you want to switch to this session

Default: True

delete

delete a session by id

datmo session delete [-h] [--name NAME]
Named Arguments
--name name of session to delete
ls

list sessions

datmo session ls [-h]
select

select a session

datmo session select [-h] [--name NAME]
Named Arguments
--name name of session to select

snapshot

Datmo snapshots allow you to save the state of your model and experiments by keeping track of your source code, environment, configuration, metrics and large files.

datmo snapshot [-h] {create,delete,ls,checkout,diff,inspect} ...

subcommands

subcommand Possible choices: create, delete, ls, checkout, diff, inspect

Sub-commands:

create

Run snapshot create any time you want to save the results of your experiments. You can then view all snapshots with the snapshot ls command.

datmo snapshot create [-h] [--message MESSAGE] [--label LABEL]
                      [--session-id SESSION_ID] [--task-id TASK_ID]
                      [--code-id CODE_ID] [--commit-id COMMIT_ID]
                      [--environment-id ENVIRONMENT_ID]
                      [--environment-def ENVIRONMENT_DEFINITION_FILEPATH]
                      [--file-collection-id FILE_COLLECTION_ID]
                      [--filepaths FILEPATHS]
                      [--config-filename CONFIG_FILENAME]
                      [--config-filepath CONFIG_FILEPATH]
                      [--stats-filename STATS_FILENAME]
                      [--stats-filepath STATS_FILEPATH]
Named Arguments
--message, -m message to describe snapshot
--label, -l label snapshots with a category (e.g. best)
--session-id user given session id
--task-id specify task id to pull information from
--code-id code id from code object
--commit-id commit id from source control
--environment-id
 environment id from environment object
--environment-def
 absolute filepath to environment definition file (e.g. /path/to/Dockerfile)
--file-collection-id
 file collection id for file collection object
--filepaths absolute paths to files or folders to include within the files of the snapshot
--config-filename
 filename to use to search for configuration JSON
--config-filepath
 absolute filepath to use to search for configuration JSON
--stats-filename
 filename to use to search for metrics JSON
--stats-filepath
 absolute filepath to use to search for metrics JSON
delete

delete a snapshot by id

datmo snapshot delete [-h] [--id ID]
Named Arguments
--id snapshot id to delete
ls

list snapshots

datmo snapshot ls [-h] [--session-id SESSION_ID] [--all]
Named Arguments
--session-id session id to filter
--all, -a

show detailed snapshot information

Default: False

checkout

checkout a snapshot by id

datmo snapshot checkout [-h] id
Positional Arguments
id snapshot id
diff

view diff between 2 snapshots

datmo snapshot diff [-h] id_1 id_2
Positional Arguments
id_1 snapshot id 1
id_2 snapshot id 2
inspect

inspect a snapshot by id

datmo snapshot inspect [-h] id
Positional Arguments
id snapshot id

task

task module

datmo task [-h] {run,ls,stop} ...

subcommands

subcommand Possible choices: run, ls, stop

Sub-commands:

run

run task

datmo task run [-h] [--gpu] [--ports PORTS]
               [--environment-def ENVIRONMENT_DEFINITION_FILEPATH]
               [--interactive]
               [cmd]
Positional Arguments
cmd command to run within environment
Named Arguments
--gpu

boolean if you want to run using GPUs

Default: False

--ports, -p
network port mapping during task (e.g. 8888:8888). Left is the host machine port and right is the environment port available during a run.
--environment-def
 absolute filepath to environment definition file (e.g. /path/to/Dockerfile)
--interactive

run the environment in interactive mode (keeps STDIN open)

Default: False

ls

list tasks

datmo task ls [-h] [--session-id [SESSION_ID]]
Named Arguments
--session-id pass in the session id to list the tasks in that session
stop

stop tasks

datmo task stop [-h] [--id ID] [--all]
Named Arguments
--id task id to stop
--all, -a

stop all datmo tasks

Default: False