Command-Line Interface

Mantik offers a set of commands to authenticate at the platform, submit runs, and make use of the Remote File Service

Authentication

Available Commands

mantik

Mantik CLI.

mantik [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

data

Interaction with data through the mantik api.

mantik data [OPTIONS] COMMAND [ARGS]...
download

Download data repository.

mantik data download [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--data-repository-id <data_repository_id>

Required Data Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_DATA_REPOSITORY_ID.

--commit <commit>

Commit hash to checkout. Takes precedence over branch.

--branch <branch>

Branch to checkout. Defaults main branch.

--target-dir <target_dir>

Required Path to directory where the data will be stored.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_DATA_REPOSITORY_ID

Provide a default for --data-repository-id

MANTIK_DATA_REPOSITORY_COMMIT

Provide a default for --commit

MANTIK_DATA_REPOSITORY_BRANCH

Provide a default for --branch

MANTIK_TARGET_DIR

Provide a default for --target-dir

init

Initialize the authentication to mantik and print the required environment variables.

It is not possible to set environment variables in a parent process (or shell) from a subprocess (e.g. Python). Thus, the init command prints the bash export statement with the required environment variable for authentication to mantik. As a consequence, the output can be directly used to set the environment variable in the parent process by using the eval bash command:

```shell
eval $(mantik init)

If you do not want to set the environment variable in the parent process but only want to pass it to the command context, use the env bash command combined with the –no-export flag:

```shell
env $(mantik init –no-export) <command>
mantik init [OPTIONS]

Options

--no-export

Strip the export prefix of the output.

Default:

False

models

Interaction with models through the mantik api.

mantik models [OPTIONS] COMMAND [ARGS]...
add

Add a new trained model entry.

mantik models add [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--name <name>

Required Model name.

--uri <uri>
--location <location>
--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

--mlflow-parameters <mlflow_parameters>

JSON data as a string.

--run-id <run_id>

Run ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_RUN_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_CONNECTION_ID

Provide a default for --connection-id

MANTIK_RUN_ID

Provide a default for --run-id

build

Trigger model containerization.

mantik models build [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

build-status

Print container build status.

mantik models build-status [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

delete

Delete a trained model.

mantik models delete [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

download

Download the containerized version of the model.

mantik models download [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

--target-dir <target_dir>

Path to directory where the zipped tarball image will be downloaded.

Default:

./

--image-type <image_type>

Type of the image to fetch from the mantik platform.

Default:

docker

Options:

docker | apptainer

--load, --no-load

Load the tarball image into docker.

Default:

False

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

get-one

Print details of specific trained model.

mantik models get-one [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

list

Print details of all trained models in project.

mantik models list [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

update

Update details of existing trained model.

mantik models update [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--model-id <model_id>

Required Model ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_MODEL_ID.

--name <name>

Required New Model name.

--uri <uri>

Required

--location <location>

Required

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

--mlflow-parameters <mlflow_parameters>

JSON data as a string.

--run-id <run_id>

Run ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_RUN_ID.

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_MODEL_ID

Provide a default for --model-id

MANTIK_CONNECTION_ID

Provide a default for --connection-id

MANTIK_RUN_ID

Provide a default for --run-id

runs

Interaction with Mantik runs.

mantik runs [OPTIONS] COMMAND [ARGS]...
download-artifacts

Download the artifacts from a run.

mantik runs download-artifacts [OPTIONS]

Options

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--run-id <run_id>

Required Run ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_RUN_ID.

--target-dir <target_dir>

Path to directory where the artifacts will be downloaded.

Default:

./

--unzip, --no-unzip

Unzip the artifacts in the target dir.

Default:

True

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_RUN_ID

Provide a default for --run-id

local

Run an MLflow project locally and save the results in Mantik API

Note that MLPROJECT_PATH is the relative path to the MLflow project file with your Code Repository as root.

Remember that when you execute a run, the code is retrieved from your remote Git Code Repository. So make sure to commit and push your changes before executing a run!

To find the respective required IDs make sure to check Mantik’s UI

mantik runs local [OPTIONS] MLPROJECT_PATH

Options

--name <name>

Required Name of the Run.

--entry-point <entry_point>

Entrypoint of the MLproject file.

Default:

main

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--data-repository-id <data_repository_id>

Data Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_DATA_REPOSITORY_ID.

--data-target-dir <data_target_dir>

Relative path to directory where the data will be stored (from code root)

Default:

data

--data-commit <data_commit>

Commit hash of data repo to checkout. Takes precedence over data-branch

--data-branch <data_branch>

Branch of data repo to checkout. Defaults main branch.

--experiment-repository-id <experiment_repository_id>

Required Experiment Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_EXPERIMENT_REPOSITORY_ID.

--code-repository-id <code_repository_id>

Required Code Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CODE_REPOSITORY_ID.

--branch <branch>

Required Name of the code repository’s branch you want to use for this run

--commit <commit>

Name of the code repository’s full commit hash you want to use for this run.

If both branch and commit hash are given, the commit hash is preferred over the branch.

--env-manager <env_manager>

Determines what environment manager is used for installing dependencies during runs (local, virtualenv or conda).

-P, --parameter <parameter>
Default:

<function <lambda> at 0x78c402d389a0>

-v, --verbose

Set logging to verbose mode.

Arguments

MLPROJECT_PATH

Required argument

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_DATA_REPOSITORY_ID

Provide a default for --data-repository-id

MANTIK_TARGET_DIR

Provide a default for --data-target-dir

MANTIK_DATA_REPOSITORY_COMMIT

Provide a default for --data-commit

MANTIK_DATA_REPOSITORY_BRANCH

Provide a default for --data-branch

MANTIK_EXPERIMENT_REPOSITORY_ID

Provide a default for --experiment-repository-id

MANTIK_CODE_REPOSITORY_ID

Provide a default for --code-repository-id

submit

Submit an MLflow project as a run to the Mantik Compute Backend.

Note that MLPROJECT_PATH is the relative path to the MLflow project folder with your Code Repository as root.

Remember that when you submit a run, the code is retrieved from your remote Git Code Repository. So make sure to commit and push your changes before submitting a run! The only file read from your local system is the backend config.

To find the respective required IDs make sure to check Mantik’s UI

mantik runs submit [OPTIONS] MLPROJECT_PATH

Options

--name <name>

Required Name of the Run.

--entry-point <entry_point>

Entrypoint of the MLproject file.

Default:

main

--backend-config <backend_config>

Required Relative or absolute path to backend config file.

--project-id <project_id>

Required Project ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_PROJECT_ID.

--data-repository-id <data_repository_id>

Data Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_DATA_REPOSITORY_ID.

--data-commit <data_commit>

Commit hash of data repo to checkout. Takes precedence over data-branch

--data-branch <data_branch>

Branch of data repo to checkout. Defaults main branch.

--experiment-repository-id <experiment_repository_id>

Required Experiment Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_EXPERIMENT_REPOSITORY_ID.

--code-repository-id <code_repository_id>

Required Code Repository ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CODE_REPOSITORY_ID.

--branch <branch>

Required Name of the code repository’s branch you want to use for this run

--commit <commit>

Name of the code repository’s full commit hash you want to use for this run.

If both branch and commit hash are given, the commit hash is preferred over the branch.

--compute-budget-account <compute_budget_account>

Name of your Compute Budget Account on HPC

If not specified, it is inferred from the environment variable MANTIK_COMPUTE_BUDGET_ACCOUNT.

-P, --parameter <parameter>
Default:

<function <lambda> at 0x78c402d389a0>

-v, --verbose

Set logging to verbose mode.

--connection-id <connection_id>

Required Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

MLPROJECT_PATH

Required argument

Environment variables

MANTIK_PROJECT_ID

Provide a default for --project-id

MANTIK_DATA_REPOSITORY_ID

Provide a default for --data-repository-id

MANTIK_DATA_REPOSITORY_COMMIT

Provide a default for --data-commit

MANTIK_DATA_REPOSITORY_BRANCH

Provide a default for --data-branch

MANTIK_EXPERIMENT_REPOSITORY_ID

Provide a default for --experiment-repository-id

MANTIK_CODE_REPOSITORY_ID

Provide a default for --code-repository-id

MANTIK_COMPUTE_BUDGET_ACCOUNT

Provide a default for --compute-budget-account

MANTIK_CONNECTION_ID

Provide a default for --connection-id

s3-file-service

Interaction with the s3 file service.

mantik s3-file-service [OPTIONS] COMMAND [ARGS]...
copy-directory
mantik s3-file-service copy-directory [OPTIONS] SOURCE TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

SOURCE

Required argument

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

copy-file
mantik s3-file-service copy-file [OPTIONS] SOURCE TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

SOURCE

Required argument

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

create-directory
mantik s3-file-service create-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

create-file
mantik s3-file-service create-file [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

exists
mantik s3-file-service exists [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

list-directory
mantik s3-file-service list-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

remove-directory
mantik s3-file-service remove-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

remove-file
mantik s3-file-service remove-file [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

user
mantik s3-file-service user [OPTIONS]

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

unicore-file-service

Interaction with the unicore file service.

mantik unicore-file-service [OPTIONS] COMMAND [ARGS]...
copy-directory
mantik unicore-file-service copy-directory [OPTIONS] SOURCE TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

SOURCE

Required argument

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

copy-file
mantik unicore-file-service copy-file [OPTIONS] SOURCE TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

SOURCE

Required argument

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

create-directory
mantik unicore-file-service create-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

create-file
mantik unicore-file-service create-file [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

exists
mantik unicore-file-service exists [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

list-directory
mantik unicore-file-service list-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

remove-directory
mantik unicore-file-service remove-directory [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

remove-file
mantik unicore-file-service remove-file [OPTIONS] TARGET

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Arguments

TARGET

Required argument

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id

user
mantik unicore-file-service user [OPTIONS]

Options

--connection-id <connection_id>

Connection ID on Mantik.

If not specified, it is inferred from the environment variable

MANTIK_CONNECTION_ID.

Environment variables

MANTIK_CONNECTION_ID

Provide a default for --connection-id