Rich client features
The VRE provided two ways of working with rich clients reachable with launchers into the JupyterLab launcher tab (plus button). Each tool is opening into a new browser tab.
a VSCode full web IDE (Integrated Development Environment) | |
a remote Desktop | |
a Machine Learning Lifecycle Platform |
VSCode
VSCode is a complete IDE with rich capabilities. By default 2 extensions are available:
- Python extension providing Python syntax highlight, code completion, environment management and unit testing support
- GitLens extension extending Git features
Remote desktop
The remote Desktop launches a full XFCE desktop environment where you can start desktop application. For example, you can start QGis or Monteverdi to manipulate large geospatial data files directly on the cluster.
MLFlow
MLFlow is a platform to streamline machine learning development, including tracking experiments, packaging code into reproducible runs, and sharing and deploying models.
You can modify MLFLow outputs paths by positionning some environment variables in your ~/.bashrc
(the values used below are the defaults):
# equivalent to --backend-store-uri, sqlite database path expected
export MLFLOW_DB=$HOME/.local/var/lib/mlflow/mlflow.db
# it is recommended to follow MLFLOW_DB
export MLFLOW_TRACKING_URI="sqlite:///$MLFLOW_DB"
# equivalent to --default-artifact-root
export MLFLOW_ARTIFACTS_ROOT=$HOME/.local/var/lib/mlflow/runs
# equivalent to --artifacts-destination
export MLFLOW_ARTIFACTS_DEST=$HOME/.local/var/lib/mlflow/artifacts
Note: if the artifact store path is set from the mlflow client, the server automatically detect its value (MLFLOW_ARTIFACTS_ROOT is overridden).
Some of these resources may take a lot of disk space, they should be set to a volume with enough disk space.
If you change these variables, they won't be taken into account automatically. To update MLFlow, you can kill your VRE instance and start a new one, or restart supervisor, the process control system running MLFlow.
You can find other interesting variables in your environment. These are read-only, don't modify them.
$MLFLOW_LOG_DIR
: path of the directory containing the logs of the MLFlow server.
MLFLow issue
In some cases, MLFlow can result in a "Gateway timeout" error at startup.
Having a look at the MLFlow log at ~/.local/var/log/mlflow/mlflow.err.log, the error is:
Error initializing backend store
Detected out-of-date database schema (found version cc1f77228345, but expected 97727af70f4d). Take a backup of your database, then run 'mlflow db upgrade <database_uri>' to migrate your database to the latest schema. NOTE: schema migration may result in database downtime - please consult your database's documentation for more detail.
Solution: This can be fixed by:
$ echo $MLFLOW_TRACKING_URI
sqlite:////home/qt/<yourusername>/.local/var/lib/mlflow/mlflow.db
$ mlflow db upgrade $MLFLOW_TRACKING_URI
2022/09/23 07:17:58 INFO mlflow.store.db.utils: Updating database tables
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade cc1f77228345 -> 97727af70f4d, Add creation_time and last_update_time to experiments table