Skip to content

Settings ​

Environment variables ​

The following environment variables can be used to override the default behavior of the package.

General ​

VariableDescription
HECTIQLAB_API_KEYThe API key to use for authentication. If specified, this value is used instead of the stored API key.
HECTIQLAB_CREDENTIALSThe location of the credentials TOML file. Default is ~/.hectiq-lab/credentials.toml.
HECTIQLAB_API_URLThe URL of the Hectiq Lab API. The default is https://api.lab.hectiq.ai.
HECTIQLAB_LOG_LEVELThe log level of the package. The default is WARNING. Set to DEBUG to increase the verbosity of the logs.

Convenience ​

VariableDescription
HECTIQLAB_PROJECTName of the current Hectiq Lab project. This value is not prefered a manual settings using set_project or to specify the project in the methods.
HECTIQLAB_ALLOW_DIRTYWhether to allow for a dirty state of the repo's project. If no, then an error will show if the repo is dirty (uncommitted changes). Default is True. This feature will be removed in futures versions.
HECTIQLAB_REPOSList of repo versions to monitor.
HECTIQLAB_MODELS_DOWNLOADDefault path where to download models in Model.download. The value of the specified argument path is prefered over the env.
HECTIQLAB_DATASETS_DOWNLOADDefault path where to download datasets in Dataset.download. The value of the specified argument path is prefered over the env.
HECTIQLAB_HIDE_PROGRESSWhether to hide progress bars on uploads and downloads.
HECTIQLAB_OFFLINE_MODEIf set (usually set to 1 to activate offline mode), no data is sent.
HECTIQLAB_DO_NOT_STORE_DIFFIf set (set to 1), the diff of the current repo is not stored in the run.
HECTIQLAB_RAISE_ERRORIf set (set to 1), the package will raise an error when it occurs. Otherwise, by default most errors are swallowed.

Tracking loadings ​

On downloads and uploads, pyhectiqlab internally uses the rich package to track progression. By default, the rich.progress.Progress does not allow for multiple instances to be created throws an exception whenever this is the case. To ensure that all progress is being tracked correctly, we can pass an exciting rich.progress.Progress instance to pyhectiqlab by using the register_progress function:

python
import os
from rich.progress import Progress
from pyhectiqlab import functional as hl

os.environ["HECTIQLAB_HIDE_PROGRESS"] = False # ensures that progress is shown

with Progress() as prog:
    task = prog.add_task(total=3)
    hl.register_progress(prog)
    for _ in range(3):
        hl.download_dataset(...) # triggers the internal progress bar for the download

If the line hl.register_progress(prog) is ommited, the exception is captured and the script is still executed, but without tracking progression of the uploads or downloads.

NameTypeDefaultDescription
progrich.progress.Progress-The Progression object passes to the lab.