Skip to content

Setup

This template can be used in MM servers (preferred as directly compatible with ai-project-template) or in your own computer. In order to use the template, please follow instructions carefully:

1. Create a local copy of the template

You need to install cruft. In MM servers, it's already installed and there is a specific environment, so you need to activate it:

conda activate cruft

Run:

Using cruft create

cruft create "https://github.com/Gradiant/ai-dataset-template.git"
cruft create git@github.com:Gradiant/ai-dataset-template.git  

Additional considerations:

And follow the prompts. A new folder will be created using your answers to the prompts (i.e. ai-dataset-{{MY_NEW_DATASET}}).

If you are in a MM server, you can now deactivate the cruft environment, since from this point on it will not be necessary:

conda deactivate

2. Create a repository on Github

Follow the official GitHub instructions. Please, ensure you create an empty repository.

For repositories of Multimodal projects, the naming convetion defined in Confluence must be used. Otherwise, the repository must be named like the folder created in the previous step (i.e. ai-dataset-{{MY_NEW_DATASET}}).

3. Publish the local template

First run (Don't skip commands):

# Assuming you are at `ai-dataset-{{MY_NEW_DATASET}}`
git init
git add --all
git commit -m "First commit"
git remote add origin  git@github.com:Gradiant/ai-dataset-{{MY_NEW_DATASET}}.git
git branch -M main
git push -u origin main

4. Setup the enviroment

Create a conda environment from conda.yml:

conda env create -f conda.yaml

Install package:

. activate {{cookiecutter.dataset_slug}}
# If previous command doesn't work, try the following one:
# conda activate {{cookiecutter.dataset_slug}}

python setup.py develop

Install pre-commit hooks:

pre-commit install

Test the enviroment:

. activate {{cookiecutter.dataset_slug}}
pytest -v tests