CommandsOps
ops
Usage: polyaxon ops [OPTIONS] COMMAND [ARGS]...
Commands for ops/runs.
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--help Show this message and exit.
Commands:
approve Approve a run waiting for human validation.
artifacts Download outputs/artifacts for run.
dashboard Open this operation's dashboard details in browser.
delete Delete a run.
exec Execute a command in a run container.
execute Execute a run on the current local machine using one of the...
get Get run.
inspect Inspect a run.
invalidate Invalidate the run's cache state.
logs Get run's logs.
ls List runs for this project.
pull Pull a remote run or multiple remote runs to a local path.
push Push a local run (or all runs) to a remove server.
restart Restart run.
resume Resume run.
service Open the operation service in browser.
shell Start an interactive shell in a running operation container.
skip Skip run.
statuses Get run's statuses.
stop Stop run.
transfer Transfer the run to a destination project under the same...
update Update run.
upload Upload runs' artifacts.ops ls
Usage: polyaxon ops ls [OPTIONS]
List runs for this project.
Uses /docs/references/cli/cache/#caching
Examples:
Get all runs:
Get all runs with status {created or running}, and creation date between
2018-01-01 and 2018-01-02, and params activation equal to sigmoid and metric
loss less or equal to 0.2
$ polyaxon ops ls -q "status:created|running, started_at:2018-01-01..2018-01-02, params.activation:sigmoid, metrics.loss:<=0.2"
Get all runs sorted by update date:
$ polyaxon ops ls -s "-updated_at"
Get all runs of kind job:
$ polyaxon ops ls -q "kind: job"
Get all runs of kind service:
$ polyaxon ops ls -q "kind: service"
Options:
-p, --project TEXT The project name, e.g. 'mnist' or 'acme/mnist'.
-io, --io List runs with their inputs/outputs (params,
metrics, results, ...).
--to-csv Saves the results to a csv file. Note that this
flag requires pandas
-q, --query TEXT To filter the runs based on a query spec.
-s, --sort TEXT To order the runs based on this sort spec.
-l, --limit INTEGER To limit the list of runs.
-off, --offset INTEGER To offset the list of runs.
-c, --columns TEXT The columns to show.
--offline To use the offline store, for resolving runs, if
it exists.
--path, --path-from PATH Optional offline root path to use where runs are
persisted, default value is taken from the env
var: `POLYAXON_OFFLINE_ROOT`.
-o, --output TEXT Optional flag to print the results as a json
object or store the results as json fileExample
`-o json` or `-o path=./data.json`
--help Show this message and exit.ops get
Usage: polyaxon ops get [OPTIONS]
Get run.
Uses /docs/references/cli/cache/#caching
Examples for getting a run:
$ polyaxon ops get # if run is cached
$ polyaxon ops get --uid 8aac02e3a62a4f0aaa257c59da5eab80 # project is cached
$ polyaxon ops get --project=cats-vs-dogs -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops get -p alain/cats-vs-dogs --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--offline To use the offline store, for resolving runs,
if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
-o, --output TEXT Optional flag to print the response as a json
object or store the response as json
fileExample `-o json` or `-o
path=./data.json`
--help Show this message and exit.ops delete
Usage: polyaxon ops delete [OPTIONS]
Delete a run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops delete
$ polyaxon ops delete --uid 8aac02e3a62a4f0aaa257c59da5eab80 # project is cached
$ polyaxon ops delete --project=cats-vs-dogs -uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-y, --yes Automatic yes to prompts. Assume "yes" as
answer to all prompts and run non-
interactively.
--offline To use the offline store, for resolving runs,
if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--help Show this message and exit.ops update
Usage: polyaxon ops update [OPTIONS]
Update run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops update --uid 8aac02e3a62a4f0aaa257c59da5eab80
--description="new description for my runs"
$ polyaxon ops update --project=cats-vs-dogs -uid 8aac02e3a62a4f0aaa257c59da5eab80 --tags="foo, bar" --name="unique-name"
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-n, --name TEXT Name of the run (optional).
--description TEXT Description of the run (optional).
--tags TEXT Tags of the run (comma separated values).
--offline To use the offline store, for resolving runs,
if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--help Show this message and exit.ops approve
Usage: polyaxon ops approve [OPTIONS]
Approve a run waiting for human validation.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops approve
$ polyaxon ops approve --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--help Show this message and exit.ops stop
Usage: polyaxon ops stop [OPTIONS]
Stop run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops stop
$ polyaxon ops stop --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-y, --yes Automatic yes to prompts. Assume "yes" as
answer to all prompts and run non-
interactively.
--help Show this message and exit.ops skip
Usage: polyaxon ops skip [OPTIONS]
Skip run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops skip
$ polyaxon ops skip --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-y, --yes Automatic yes to prompts. Assume "yes" as
answer to all prompts and run non-
interactively.
--help Show this message and exit.ops restart
Usage: polyaxon ops restart [OPTIONS]
Restart run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops restart
$ polyaxon ops restart --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--name TEXT Name to give to this run, must be unique
within the project, could be none.
--tags TEXT Tags of this run (comma separated values).
--description TEXT The description to give to this run.
-c, --copy Copy mode clones the run before restarting
instead to not mutate the current state of
the run.
--copy-dir TEXT To copy specific dirs from the run's
artifacts before restarting, you can pass
multiple dirs to copy `--copy-dir dir1
--copy-dir path/to/dir2`.
--copy-file TEXT To copy specific dirs from the run's
artifacts before restarting, you can pass
multiple dirs to copy `--copy-file file1
--copy-file path/to/file2`.
-f, --file PATH Optional polyaxonfile to use. The config
passed will be treated as an override.Use
`--recompile` to use a full specification
instead of an override/preset config.
--recompile A flag to tell Polyaxon that polyaxonfile is
a full specification.
--help Show this message and exit.ops resume
Usage: polyaxon ops resume [OPTIONS]
Resume run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops resume
$ polyaxon ops resume --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--name TEXT Name to give to this run, must be unique
within the project, could be none.
--tags TEXT Tags of this run (comma separated values).
--description TEXT The description to give to this run.
-f, --file PATH Optional polyaxonfile to use. The config
passed will be treated as an override.Use
`--recompile` to use a full specification
instead of an override/preset config.
--recompile A flag to tell Polyaxon that polyaxonfile is
a full specification.
--help Show this message and exit.ops invalidate
Usage: polyaxon ops invalidate [OPTIONS]
Invalidate the run's cache state.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops invalidate
$ polyaxon ops invalidate --uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--help Show this message and exit.ops execute
Usage: polyaxon ops execute [OPTIONS]
Execute a run on the current local machine using one of the specified
executor.
Uses /docs/references/cli/cache/#caching
Examples getting executing a run:
$ polyaxon ops execute
$ polyaxon ops execute -uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-exc, --executor TEXT The executor to use, possible values are:
docker, k8s, process.
--help Show this message and exit.ops statuses
Usage: polyaxon ops statuses [OPTIONS]
Get run's statuses.
Uses /docs/references/cli/cache/#caching
Examples getting run statuses:
$ polyaxon ops statuses
$ polyaxon ops statuses -uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-w, --watch Watch statuses.
--offline To use the offline store, for resolving runs,
if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--help Show this message and exit.ops logs
Usage: polyaxon ops logs [OPTIONS]
Get run's logs.
Uses /docs/references/cli/cache/#caching
Examples for getting run logs:
$ polyaxon run logs
$ polyaxon ops logs -uid 8aac02e3a62a4f0aaa257c59da5eab80 -p mnist
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-nf, --no-follow Stream logs after showing past logs.
-h, --hide-time Whether or not to hide timestamps from the
log stream.
--all-containers Whether to stream logs from all containers.
-a, --all-info Whether to show all information including
container names, pod names, and node names.
--offline To use the offline store, for resolving runs,
if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--help Show this message and exit.ops inspect
Usage: polyaxon ops inspect [OPTIONS]
Inspect a run.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops inspect -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops inspect -p acme/project -uid 8aac02e3a62a4f0aaa257c59da5eab80
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--help Show this message and exit.ops exec
Usage: polyaxon ops exec [OPTIONS] [COMMAND]...
Execute a command in a run container.
The command must follow a `--` separator:
$ polyaxon ops exec -p acme/project -uid 8aac02e3a62a4f0aaa257c59da5eab80 -- python -V
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--pod TEXT Optional. In a multi-replica or distributed
job, the pod to use for selecting the
container.
--container TEXT Optional. The container to use for executing
the command, by default the main container is
used..
--help Show this message and exit.ops shell
Usage: polyaxon ops shell [OPTIONS]
Start an interactive shell in a running operation container.
Uses /docs/references/cli/cache/#caching
This command uses Kubernetes exec. By default, it selects the first pod and
the main container. Use ``--pod`` and ``--container`` to target a specific
replica or container.
The default command is ``/bin/bash``. When the operation enables
``plugins.tmux``, the default instead creates or attaches to the
``terminal`` tmux session so the shell can survive a client or proxy
disconnect. Supplying ``--command`` bypasses that tmux default. Without
tmux, the remote process is tied to the Kubernetes exec connection. Neither
mode survives a target pod restart.
Command strings are split on whitespace and executed directly rather than
through a local shell.
Examples:
$ polyaxon ops shell -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops shell -p acme/project -uid 8aac02e3a62a4f0aaa257c59da5eab80 --command=python
$ polyaxon ops shell -p acme/project -uid 8aac02e3a62a4f0aaa257c59da5eab80 -cmd="/bin/bash"
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-cmd, --command TEXT The command to execute, default: /bin/bash
(or tmux if the plugin is enabled).
--pod TEXT Optional. In a multi-replica or distributed
job, the pod to use for selecting the
container.
--container TEXT Optional. The container to use for starting
the shell session, by default the main
container is used..
--help Show this message and exit.ops artifacts
Usage: polyaxon ops artifacts [OPTIONS]
Download outputs/artifacts for run.
If no files, dirs, or refs are provided, the full run's artifacts will be
downloaded.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80 --dir "uploads/path/dir"
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80 -f "outputs/path/file1" --file="outputs/path/file2" -d "outputs/path/dir1"
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80 --path="this/path"
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80 -l-name image-example -l-name debug-csv-file --path="this/path"
$ polyaxon ops artifacts -uid 8aac02e3a62a4f0aaa257c59da5eab80 -l-kind model -l-kind env --path="this/path"
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-f, --file TEXT Optional list of files to download.
-d, --dir TEXT Optional list of dirs to download.
-l-name, --lineage-name TEXT Optional list of artifact lineage name
references.
-l-kind, --lineage-kind TEXT Optional list of artifact lineage kind
references.
--path, --path-to PATH The destination where to download the
artifacts.
--no-untar Disable the automatic untar of the downloaded
artifacts.
--help Show this message and exit.ops upload
Usage: polyaxon ops upload [OPTIONS]
Upload runs' artifacts.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops upload -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops upload -uid 8aac02e3a62a4f0aaa257c59da5eab80 --path-from="path/to/upload"
$ polyaxon ops upload -uid 8aac02e3a62a4f0aaa257c59da5eab80 --path-to="path/to/upload/to"
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
--path-from PATH The path to upload from relative the current
location (or absolute path), Note that this
must be a valid path, or the CLI will raise
an error. Defaults to the current path.
--path-to TEXT The destination where to upload the
artifacts. If the path is '/' the root
artifacts path of the run will be used,
otherwise the values should start without the
separator, e.g. `uploads`, `code`,
`dataset/images/values`, ...
--sync-failure To set the run to failed if the upload fails.
-ag, --agent TEXT Optional, uuid reference of an agent to use.
--ignore-agent-host Optional, to ignore the agent host.
--help Show this message and exit.ops transfer
Usage: polyaxon ops transfer [OPTIONS]
Transfer the run to a destination project under the same owner/organization.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops transfer --to-project dest-project
$ polyaxon ops transfer -p acme/foobar -uid 8aac02e3a62a4f0aaa257c59da5eab80 -to=dest-project
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-to, --to-project TEXT The project to transfer the operation/run to.
--help Show this message and exit.ops dashboard
Usage: polyaxon ops dashboard [OPTIONS]
Open this operation's dashboard details in browser.
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-y, --yes Automatic yes to prompts. Assume "yes" as
answer to all prompts and run non-
interactively.
--url Print the url of the dashboard for this run.
--offline To use the offline store, for resolving
runs, if it exists.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
-SC, --server-config, --sconfig NAME=VALUE
A configuration to override the default
options for the local streaming server of
the run, form `-SC key=value` or `--server-
config key=value` or `--sconfig key=value`.
--help Show this message and exit.ops service
Usage: polyaxon ops service [OPTIONS]
Open the operation service in browser.
N.B. The operation must have a run kind service, otherwise it will raise an
error.
You can open the service embedded in Polyaxon UI or using the real service
URL, please use the `--external` flag.
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-y, --yes Automatic yes to prompts. Assume "yes" as
answer to all prompts and run non-
interactively.
--external Open the external service URL.
--url Print the url of the dashboard or external
service.
--help Show this message and exit.ops pull
Usage: polyaxon ops pull [OPTIONS]
Pull a remote run or multiple remote runs to a local path.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops pull -uid 8aac02e3a62a4f0aaa257c59da5eab80
$ polyaxon ops pull -uid 8aac02e3a62a4f0aaa257c59da5eab80 --no-artifacts
$ polyaxon ops pull -uid 8aac02e3a62a4f0aaa257c59da5eab80 --path /tmp/base
$ polyaxon ops pull -q "status: succeeded, kind: job, metrics.loss: <0.2" --l 10 --path /tmp/base
$ polyaxon ops pull -a
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-a, --all-runs To pull all runs.
-q, --query TEXT To filter the runs based on a query spec.
-l, --limit INTEGER To limit the list of runs.
-off, --offset INTEGER To offset the list of runs.
--no-artifacts To disable downloading the run's artifacts
and only persist the metadata. This is useful
if you want to move a run from one Polyaxon
deployment to another while keeping the same
artifacts store.
--path, --path-to PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--help Show this message and exit.ops push
Usage: polyaxon ops push [OPTIONS]
Push a local run (or all runs) to a remove server.
Uses /docs/references/cli/cache/#caching
Examples:
$ polyaxon ops push -a --clean
$ polyaxon ops push --path /tmp/experiments --clean
$ polyaxon ops push -uid 8aac02e3a62a4f0aaa257c59da5eab80 --no-artifacts
$ polyaxon ops push -uid 8aac02e3a62a4f0aaa257c59da5eab80 --clean
$ polyaxon ops push -uid 8aac02e3a62a4f0aaa257c59da5eab80 --reset-project
$ polyaxon ops push -uid 8aac02e3a62a4f0aaa257c59da5eab80 --ignore-agent-host --ignore-store
$ polyaxon ops push -uid 8aac02e3a62a4f0aaa257c59da5eab80 --reset-project -p send-to-project
Options:
-p, --project TEXT The project name, e.g. 'mnist' or
'acme/mnist'.
-uid, -id, --uid, --uuid TEXT The run uuid.
-a, --all-runs To push all runs.
--no-artifacts To disable uploading artifacts and only sync
metadata. This is useful if you want to move
a run from one Polyaxon deployment to another
while keeping the same artifacts store (no
artifacts transfer).
-c, --clean To clean the run(s) local data after syncing.
--path, --path-from PATH Optional offline root path to use where runs
are persisted, default value is taken from
the env var: `POLYAXON_OFFLINE_ROOT`.
--reset-project Optional, to ignore the owner/project of the
local run and use the owner/project provided
or resolved from the current project.
--reset-uuid Optional, to ignore the uuid of the local run
and generate a new uuid.
-ag, --agent TEXT Optional, uuid reference of an agent to use.
--ignore-agent-host Optional, to ignore the agent host.
--ignore-store Optional, to ignore the store information of
the run and use the default store of the
server.
-n, --name TEXT Optional, a new name to set for the run.
--help Show this message and exit.