Job#
- class mergernet.jobs.j002.Job[source]#
Bases:
Experiment
Attributes
Identifier of the experiment set by user.
'exp_``exp_id``'
The path in Google Drive where the artifacts of a experiment run will be uploaded to.
The path in Google Drive where the shared artifacts for all experiments are stored, e.g.
The path in local environment where artifacts (outputs of an experiment, e.g.
The path in local environment where shared files (e.g.
Notes for current run of this experiment
- class Tracker#
Bases:
object
Context manager that creates an wandb project
- Parameters:
See also
mergernet.core.experiment.init_wandb
- _post_run()#
Post-run tasks automatically performed when run is called, that includes:
upload registered artifacts
See also
mergernet.core.experiment.upload_registered_artifacts()
- _pre_run()#
Pre-run tasks automatically performed when run is called, that includes:
clear log file
setup experiment global attributes
See also
mergernet.core.experiment._setup_experiment_attributes()
- _setup_experiment_attributes()#
Configure the experiment identifiers and file system to store the files needed (e.g. dataset) and the files generated by the experiment (e.g. models, dataset, logs, predictions)
- classmethod autoclean()#
- classmethod download_file_gd(fname: str, exp_id: int | None = None, shared: bool = False)#
Downloads a file from google drive inside gd_artifact_path
- classmethod finish_wandb()#
Closes the connection with current wandb project
- classmethod init_wandb(config: dict = {}, job_type: str | None = None, name: str | None = None, tags: list = [])#
Creates a wandb project
- Parameters:
See also
mergernet.core.experiment.finish_wandb()
,mergernet.core.experiment.Tracker()
- classmethod register_artifact(fname: str, service: str)#
Register an artifact that will be automatically uploaded to corresponding service at the end of the experiment
- run()#
Run the experiement defined in the abstract call method executing pre-run and post-run tasks
See also
mergernet.core.experiment._pre_run()
,mergernet.core.experiment._post_run()
- classmethod upload_file_gd(fname: str, data: Any | None = None)#
Uploads a file to google drive inside gd_artifact_path
- Parameters:
fname (str) – The file name
data (Any, optional) – The content of the file. If not specified, this method will consider the data of the file with same name as fname inside the local_artifact_path folder. If specified, it can be a json serializable python object or the bytes of the file.
- classmethod upload_registered_artifacts()#
Uploads all registered artifacts
- gd_exp_path: Path = None#
The path in Google Drive where the artifacts of a experiment run will be uploaded to.
The path in Google Drive where the shared artifacts for all experiments are stored, e.g. external datasets.
- local_exp_path: Path = None#
The path in local environment where artifacts (outputs of an experiment, e.g. model predictions) are stored.
The path in local environment where shared files (e.g. dataset) are stored. This path is shared to any run of any experiemnt.