From 432f0a025c4af36c019e3a13112a4cf1cc6f7c31 Mon Sep 17 00:00:00 2001 From: lisab00 Date: Mon, 28 Aug 2023 13:48:59 +0200 Subject: [PATCH 1/4] add documentation --- domainlab/mk_exp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/domainlab/mk_exp.py b/domainlab/mk_exp.py index f609715b7..3abac8526 100644 --- a/domainlab/mk_exp.py +++ b/domainlab/mk_exp.py @@ -12,8 +12,13 @@ def mk_exp(task, model, trainer, test_domain, batchsize): """ - test_domain must be a single string + Creates a custom experiment. The user can specify the input parameters. + + Parameters: task, model, trainer, test_domain (must be a single string), batch size + + 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()) From ef04f672cdf28d3eaa5a3e27715a3daf565f876a Mon Sep 17 00:00:00 2001 From: lisab00 Date: Mon, 28 Aug 2023 16:26:51 +0200 Subject: [PATCH 2/4] insert param type --- domainlab/mk_exp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domainlab/mk_exp.py b/domainlab/mk_exp.py index 3abac8526..f3ccbabd9 100644 --- a/domainlab/mk_exp.py +++ b/domainlab/mk_exp.py @@ -10,11 +10,11 @@ -def mk_exp(task, model, trainer, test_domain, batchsize): +def mk_exp(task, model, trainer:str, test_domain:str, batchsize:int): """ Creates a custom experiment. The user can specify the input parameters. - Parameters: task, model, trainer, test_domain (must be a single string), batch size + Parameters: task, model, trainer (string), test_domain (string), batch size (int) Returns: experiment """ From 6a6824299858e6e9c6538e1c619a88fb05e2965b Mon Sep 17 00:00:00 2001 From: lisab00 Date: Fri, 1 Sep 2023 09:57:59 +0200 Subject: [PATCH 3/4] amended doc --- domainlab/mk_exp.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/domainlab/mk_exp.py b/domainlab/mk_exp.py index f3ccbabd9..b7fa4874f 100644 --- a/domainlab/mk_exp.py +++ b/domainlab/mk_exp.py @@ -14,7 +14,16 @@ def mk_exp(task, model, trainer:str, test_domain:str, batchsize:int): """ Creates a custom experiment. The user can specify the input parameters. - Parameters: task, model, trainer (string), test_domain (string), batch size (int) + 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 "myModel" by importing "mk_myModel" function from + "domainlab.models.model_myModel". For a concrete example and explanation of the input params + refer to the documentation found in "domainlab.models.model_myModel.py" + - trainer: string, + - test_domain: string, + - batch size: int Returns: experiment """ From 2a6ee1df4a2007be76e69a98b691724583cb3253 Mon Sep 17 00:00:00 2001 From: lisab00 Date: Fri, 1 Sep 2023 14:11:12 +0200 Subject: [PATCH 4/4] change placeholder for model name --- domainlab/mk_exp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/domainlab/mk_exp.py b/domainlab/mk_exp.py index b7fa4874f..1e15bd87f 100644 --- a/domainlab/mk_exp.py +++ b/domainlab/mk_exp.py @@ -18,9 +18,9 @@ def mk_exp(task, model, trainer:str, test_domain:str, batchsize:int): - 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 "myModel" by importing "mk_myModel" function from - "domainlab.models.model_myModel". For a concrete example and explanation of the input params - refer to the documentation found in "domainlab.models.model_myModel.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