domainlab package

Subpackages

Submodules

domainlab.arg_parser module

Command line arguments

class domainlab.arg_parser.ParseValuesOrKeyValuePairs(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

Class used for arg parsing where values are provided in a key value format

domainlab.arg_parser.apply_dict_to_args(args, data: dict, extend=False)[source]

Tries to apply the data to the args dict of DomainLab. Unknown keys are silently ignored as long as extend is not set.

domainlab.arg_parser.mk_parser_main()[source]

Args for command line definition

domainlab.arg_parser.parse_cmd_args()[source]

get args from command line

domainlab.cli module

command-line interface (CLI) for the domainlab package

domainlab.cli.domainlab_cli()[source]

Function used to run domainlab as a command line tool for the package installed with pip.

domainlab.mk_exp module

make an experiment

domainlab.mk_exp.mk_exp(task, model, trainer: str, test_domain: str, batchsize: int, nocu=False)[source]

Creates a custom experiment. The user can specify the input parameters.

Input Parameters:
  • task: create a task to a custom dataset by importing “mk_task_dset” function from

“domainlab.tasks.task_dset”. For more explanation on the input params refer to the documentation found in “domainlab.tasks.task_dset.py”. - model: create a model [NameOfModel] by importing “mk_[NameOfModel]” function from “domainlab.models.model_[NameOfModel]”. For a concrete example and explanation of the input params refer to the documentation found in “domainlab.models.model_[NameOfModel].py” - trainer: string, - test_domain: string, - batch size: int

Returns: experiment

Module contents

globals for the whole package

domainlab.g_list_model_penalized_reg_agg(list_penalized_reg)[source]

aggregate along the list, but do not diminish the batch structure of the tensor