Sematic comes with a handy CLI to perform various tasks.
$ sematic start
This command will simply start Sematic's web server locally. It should open a window in your browser.
To stop the app, simply do:
$ sematic stop
Sematic comes with a number of examples out-of-the-box.
To run one do:
$ sematic run examples/mnist/pytorch
Since Sematic makes sure not to include unnecessary heavy dependencies, you may be prompted to install those needed by the example you want to run.
Certain Sematic functionalities need certain settings variables to be set.
These settings control which backend Server will be used when you issue
commands, and other user-specific configurations. For example, SnowflakeTable
needs your Snowflake credentials to be able to query your data for you.
You can set user settings as follows:
$ sematic settings set VAR VALUE
For example:
$ sematic settings set SNOWFLAKE_USER "foobar"
Then you can check your stored settings with:
$ sematic settings show
Active user settings:
SNOWFLAKE_USER: foobar
These settings are simply stored in the ~/.sematic/settings.yaml
file on
your machine (the "default" qualifier is a placeholder for a future feature):
$ cat ~/.sematic/settings.yaml
default:
SNOWFLAKE_USER: foobar
You can always override them at runtime with an environment variable:
$ SNOWFLAKE_USER="notfoobar" sematic settings show
Active user settings:
SNOWFLAKE_USER: notfoobar
If you'd like, you can even change which directory Sematic uses to hold its
settings by setting the environment variable SEMATIC_CONFIG_DIR
. This can
be either a relative path (it will be treated as relative to your home
directory) or an absolute path.
This is a partial list of supported user settings:
SEMATIC_API_ADDRESS
: the address of the Sematic server to use for pipeline executions; optionalSEMATIC_API_KEY
: the user's personal API key, used to associate pipeline submissions; requiredSNOWFLAKE_USER
: the Snowflake user; required only if you have pipelines that use SnowflakeSNOWFLAKE_PASSWORD
: the Snowflake password; required only if you have pipelines that use SnowflakeSNOWFLAKE_ACCOUNT
: the Snowflake account; required only if you have pipelines that use SnowflakeAWS_S3_BUCKET
: the S3 bucket to use for persisting artifacts; required only for cloud pipeline submissions
The same way that certain settings need to be kept on the user side, certain ones need to configure the backend Server.
The way you configure these depends on how the server you are using is deployed.
If you are using a local server, created with sematic start
, you can use:
$ sematic settings set -p sematic.config.server_settings.ServerSettings GRAFANA_PANEL_URL https://grafana.com/
These settings are simply stored in the same ~/.sematic/settings.yaml
file on the
machine where the user settings are stored:
$ cat ~/.sematic/settings.yaml
AWS_S3_BUCKET: XXX
KUBERNETES_NAMESPACE: default
SEMATIC_AUTHORIZED_EMAIL_DOMAIN: XXX
SEMATIC_AUTHENTICATE: 'true'
GOOGLE_OAUTH_CLIENT_ID: XXX
GRAFANA_PANEL_URL: XXX
They can also be overridden via environment variables, just like the user settings. If you have deployed your Sematic server in a Docker container, environment variables are the preferred way to configure it.
This is a partial list of supported server settings:
SEMATIC_AUTHENTICATE
: whether to require authentication on API calls; optionalSEMATIC_AUTHORIZED_EMAIL_DOMAIN
: the email domain that is allowed to create accounts in the UI; optionalSEMATIC_WORKER_API_ADDRESS
: the address of the remote cloud worker API, such as the Kubernetes API; optional; if set, this should be set to the DNS location of the Sematic service within KubernetesSEMATIC_DASHBOARD_URL
: the address that will be used to construct links to locations in the dashboard (ex: in log outputs).GOOGLE_OAUTH_CLIENT_ID
: the Google OAuth client ID to use for authentication; optionalGITHUB_OAUTH_CLIENT_ID
: the GitHub OAuth client ID to use for authentication; optionalGRAFANA_PANEL_URL
: the URL of the Grafana deployment that tracks jobs details
There are other settings which are only relevant in the case that you have done a helm deployment of Sematic. For these configurations, please refer to our (helm docs)[https://sematic-ai.github.io/helm-charts/sematic-server/]. Note that those docs also provide ways to configure the settings above via helm, which is preferred for helm deployments.
You can cancel pipelines using the cancel
command:
$ sematic cancel <run-id>
where run-id
is the ID of any run in the pipeline. You can get this ID from
the console logs, or from the UI.
Note that all unfinished runs in the pipeline will be canceled.