Submitting an Application¶
Mantik allows you to execute your ML applications on your local system using the CLI and a python package.
Submitting Runs¶
A Mantik run represents an application submitted for execution on a system. A run might, for example, train a ML model, or load and use a trained ML model for inference.
First, set your credentials as environment variables (see).
mantik runs local <relative path to mlproject file> \
--run-name <Name of the Run> \
--project-id <ID of the project to which the run should be linked> \
--experiment-repository-id <ID of the experiment repository to which the run
should be linked> \
--code-repository-id <ID of the code repository where the mlproject is located> \
--branch <branch name> \
-P <key>=<value> \
where <relative path to mlproject file>
refers to the path to the MLproject file, with the MLproject directory as
base directory. You will find all the needed IDs in Mantik’s UI.
The response contains the run ID and the timestamp, so that you can find your runs easily in the UI and interact with them via the Mantik API.
For further details see the CLI reference
import mantik.local.runs
mantik.runs.local.start_local_run(
data=mantik.local.schemas.RunConfiguration(
name="<Name of run>",
mlflow_parameters={ < key: value
pairs
for mlflow parameters and values >},
mlflow_mlproject_file_path="<relative path to mlproject file>",
experiment_repository_id="<ID of the experiment repository to which the run should be linked>",
code_repository_id="<ID of the code repository where the mlproject is located>",
branch="<Name of the code repository's branch>",
entry_point="<Entry point of project>",
backend_config="<System specifications object>"
),
project_id= < ID of the project to which the run should be linked >
mantik_token= < Mantik platform token >,
)
where <relative path to mlproject file>
refers to the path to the MLproject file, with the MLproject directory as
base directory. You will find all the needed IDs in Mantik’s UI.
For further details see
[Python API documentation](../python-api/mantik/compute_backend/client/index.rst#mantik.compute_backend.client.ComputeBackendClient.submit_run)
.
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!
Interacting With Submitted Runs¶
In the Runs view, you can find all the runs related to a specific project. Here, you will find details like the experiment repository, the run’s start time, and its current status. You can interact with a run by clicking on any of the icons in the “Action” column.
To delete the run from your project click on
Configuration¶
In order to support reproducability of the runs, the system by default would obtain system and platform information about the local machine that the run was executed on. This information would be shown under backend_config in the run details. It is possible for the user to not allow this using the flag
--backend-config-system-info False
For more options and details for running locally, consult the Local Runs Tutorial
mantik runs local --help
Example Projects¶
For a set of example projects using Mantik see this.