Skip to content

Commit

Permalink
Merge pull request #336 from marrlab/lb_doc_mk_exp
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun authored Sep 1, 2023
2 parents db829a0 + 2a6ee1d commit 4138a09
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions domainlab/mk_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@



def mk_exp(task, model, trainer, test_domain, batchsize):
def mk_exp(task, model, trainer:str, test_domain:str, batchsize:int):
"""
test_domain must be a single string
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
"""

str_arg = f"--aname=apimodel --trainer={trainer} --te_d={test_domain} --bs={batchsize}"
parser = mk_parser_main()
conf = parser.parse_args(str_arg.split())
Expand Down

0 comments on commit 4138a09

Please sign in to comment.