Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

README.md 2.1 KB

You have to be logged in to leave a comment. Sign In

BlackSwan Experiments Pipelines

Setup

Install python >= 3.10

Activate venv

According to poetry documentation:

Poetry should always be installed in a dedicated virtual environment to isolate it from the rest of your system. In no case, it should be installed in the environment of the project that is to be managed by Poetry.

python3.10 -m venv .venv
source .venv/bin/activate

Install poetry

pip3 install -U pip setuptools
pip3 install poetry

Install DVC

pip3 install 'dvc[s3]'

Setup DVC

Go to the main repo page on dagshub.com, click Remote, select tab Data, select DVC and copy section Setup credentials (click eye icon to show your keys).

dvc remote modify origin --local access_key_id <secret>
dvc remote modify origin --local secret_access_key <secret>
dvc pull

Add file to dvc

dvc add <path-to-file>
dvc commit
dvc push

There should be changes done to a file with extension .dvc that is tracked by git. Commit and push these changes.

Setup MLflow

Go to the main repo page on dagshub.com, click Remote, select tab Experiments and copy section Using MLflow tracking (click eye icon to show your keys).

export MLFLOW_TRACKING_URI=https://dagshub.com/hamsterkmak/black-swan-experiments.mlflow \
export MLFLOW_TRACKING_USERNAME=<secret> \
export MLFLOW_TRACKING_PASSWORD=<secret> \

Install dependecies

I had to install torch via pip, not poetry, because poetry chooses the latest cuda version, and pip chooses the version that is compatible with cuda version from my machine.

pip3 install torch
poetry lock
poetry install

Run

poetry run python3 -m src.main

Setup dagshub account

To push changes to dagshub, create a password or token. Later store token, activating Git Credential Manager

git config credential.helper store

After this command, in the next commit/push it will ask you for user/password/token and save it for later.

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...