This repository contains the example of ClearML
usage.
- Clone the repository using
git clone
command. - Open the terminal and go to the project directory using
cd
command. - Create virtual environment using
python -m venv venv
orconda create -n venv python=3.10
command. We have usedPython 3.10
during development. - Activate virtual environment using
source venv/bin/activate
orconda activate venv
command. - Install poetry using instructions from
here. Use
with the official installer
section. - Set the following option to disable new virtualenv creation:
poetry config virtualenvs.create false
- Install dependencies using
poetry install --no-root -E all
command. The--no-root
flag is needed to avoid installing the package itself. - Setup
pre-commit
hooks usingpre-commit install
command. More information aboutpre-commit
you can find here. - Run the test to check the correctness of the project work using following
command:
python -m unittest -b
- After successful passing of the tests, you can work with the project!
- If you want to add new dependencies, use
poetry add <package_name>
command. More information aboutpoetry
you can find here. - If you want to add new tests, use
unittest
library. More information aboutunittest
you can find here. All tests should be placed in thetests
directory. - All commits should be checked by
pre-commit
hooks. If you want to skip this check, usegit commit --no-verify
command. But it is not recommended to do this. - Also, you can run
pre-commit
hooks manually usingpre-commit run --all-files
command. - More useful commands you can find in
Makefile
.
- See
installation guide
for your platform. If you encounter the
elasticserach
error, try to change the volume for this service to:
- /opt/clearml/elasticsearch/logs:/usr/share/elasticsearch/logs`
- Run the
docker-compose
to start the server - Initialize
ClearML
client (firstly, you need to install the python dependencies):
clearml-init
- Run the following command to start the worker:
clearml-agent daemon --queue default --foreground
- Generate the dataset using the following command:
python scripts/01-generate-data.py
- Create and upload dataset to the
ClearML
:
python scripts/02-create-dataset.py
- Train & Evaluate the model using the following command:
python scripts/05-run-main.py
- Navigate to the
ClearML
web interface and see the results. By default, it is available onhttp://localhost:8080
.