This repository contains the example of ClearML usage.
- Clone the repository using
git clonecommand. - Open the terminal and go to the project directory using
cdcommand. - Create virtual environment using
python -m venv venvorconda create -n venv python=3.10command. We have usedPython 3.10during development. - Activate virtual environment using
source venv/bin/activateorconda activate venvcommand. - Install poetry using instructions from
here. Use
with the official installersection. - Set the following option to disable new virtualenv creation:
poetry config virtualenvs.create false - Install dependencies using
poetry install --no-root -E allcommand. The--no-rootflag is needed to avoid installing the package itself. - Setup
pre-commithooks usingpre-commit installcommand. More information aboutpre-commityou 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 aboutpoetryyou can find here. - If you want to add new tests, use
unittestlibrary. More information aboutunittestyou can find here. All tests should be placed in thetestsdirectory. - All commits should be checked by
pre-commithooks. If you want to skip this check, usegit commit --no-verifycommand. But it is not recommended to do this. - Also, you can run
pre-commithooks manually usingpre-commit run --all-filescommand. - More useful commands you can find in
Makefile.
- See
installation guide
for your platform. If you encounter the
elasticseracherror, try to change the volume for this service to:
- /opt/clearml/elasticsearch/logs:/usr/share/elasticsearch/logs`
- Run the
docker-composeto start the server - Initialize
ClearMLclient (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
ClearMLweb interface and see the results. By default, it is available onhttp://localhost:8080.