domainlab.exp package¶
Submodules¶
domainlab.exp.exp_cuda_seed module¶
Random seed should be set from command line to ensure reproducibility: https://pytorch.org/docs/stable/notes/randomness.html https://discuss.pytorch.org/t/difference-between-torch-manual-seed-and-torch-cuda-manual-seed/13848/6
domainlab.exp.exp_main module¶
experiment
domainlab.exp.exp_utils module¶
- This module contains 3 classes inheriting:
ExpProtocolAggWriter(AggWriter(ExpModelPersistVisitor))
- class domainlab.exp.exp_utils.AggWriter(host)[source]¶
Bases:
ExpModelPersistVisitor
aggregate results to text file.
all dependencies are in the constructor
- confmat_to_file(confmat, confmat_filename)[source]¶
Save confusion matrix as a figure
- Parameters:
confmat – confusion matrix.
- class domainlab.exp.exp_utils.ExpModelPersistVisitor(host)[source]¶
Bases:
object
This class couples with Task class attributes
- load(suffix=None)[source]¶
load pre-defined model name from disk the save function is the same class so to ensure load will ways work
- model_dir = 'saved_models'¶
- model_suffix = '.model'¶
- class domainlab.exp.exp_utils.ExpProtocolAggWriter(host)[source]¶
Bases:
AggWriter
AggWriter tailored to experimental protocol Output contains additionally index, exp task, te_d and params.