Projects ​
All experiments tracked by the Hectiq Lab are divided into and associated with projects.
Setting and getting a project ​
At the beginning each session, you should always specify the project in which your experiment is taking place.
python
from pyhectiqlab.functional import set_project
set_project("organisation/my-project")
python
from pyhectiqlab.project import Project
Project.set("organisation/my-project")
Use the project getter methods to get the name of the project anywhere in your code.
python
from pyhectiqlab.functional import get_project
project_slug = get_project()
python
from pyhectiqlab.project import Project
project_slug = Project.get()
Creating a new project ​
To create a new project, you should only use the command-line interface.
bash
hectiq-lab Project.create --name organisation/my-new-project
Name | Type | Default | Description |
---|---|---|---|
name | str | The name of the project, which must be factored such that organisation/project . | |
repo | str | None | The git repository associated with the project. |
force_no_git_diff | bool | False | A flag that imposes no git diff upon requests. |
write_config | bool | False | Whether to write the project config to disk. |
Retrieving a project ​
To retrieve a project, or any information about it, use the CLI, the object-oriented or functional APIs.
python
from pyhectiqlab.functional import retrieve_project
info = retrieve_project(name="organisation/my-project")
python
from pyhectiqlab.project import Project
info = Project.retrieve(name="organisation/my-project")
bash
hectiq-lab Project.retrieve --name organisation/my-project