From 31f90fcafc7936896c5e55e2b99928ae7207a772 Mon Sep 17 00:00:00 2001 From: Matteo Wohlrapp Date: Tue, 25 Jun 2024 10:01:09 +0200 Subject: [PATCH 1/4] Saving initial model --- domainlab/exp/exp_main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/domainlab/exp/exp_main.py b/domainlab/exp/exp_main.py index 12ecea5f5..3d60ac520 100755 --- a/domainlab/exp/exp_main.py +++ b/domainlab/exp/exp_main.py @@ -59,6 +59,7 @@ def __init__(self, args, task=None, model=None, observer=None, visitor=AggWriter # visitor must be initialized last after trainer is initialized self.experiment_duration = None self.model.set_saver(self.visitor) + self.model.save() def execute(self, num_epochs=None): """ From 3dfd3a4427386d0aa05a98e60ed3e0a35b6c619b Mon Sep 17 00:00:00 2001 From: Xudong Sun Date: Sat, 13 Jul 2024 01:07:58 +0200 Subject: [PATCH 2/4] Update ci.yml, rm -rf instead rm -r --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1a4fa9b6..9d93b8530 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: test if api works run: poetry run python examples/api/jigen_dann_transformer.py - name: Generate coverage report - run: rm -r zoutput && poetry run pytest --cov=domainlab tests/ --cov-report=xml + run: rm -rf zoutput && poetry run pytest --cov=domainlab tests/ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: @@ -42,7 +42,7 @@ jobs: env: CODECOV_TOKEN: 02ecb3ac-b7ce-4ea4-90a2-961c3d1a1030 - name: check if readme yaml works - run: rm -r zoutput && python main_out.py -c ./examples/conf/vlcs_diva_mldg_dial.yaml + run: rm -rf zoutput && python main_out.py -c ./examples/conf/vlcs_diva_mldg_dial.yaml - name: test if examples in markdown works run: bash -x -v scripts/ci_run_examples.sh - name: test if benchmark works From c2ad38a0c36e69596d41eed9c04966eb35660b37 Mon Sep 17 00:00:00 2001 From: Xudong Sun Date: Thu, 25 Jul 2024 18:00:22 +0200 Subject: [PATCH 3/4] Update exp_main.py --- domainlab/exp/exp_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domainlab/exp/exp_main.py b/domainlab/exp/exp_main.py index 3d60ac520..ca2b6a535 100755 --- a/domainlab/exp/exp_main.py +++ b/domainlab/exp/exp_main.py @@ -59,7 +59,7 @@ def __init__(self, args, task=None, model=None, observer=None, visitor=AggWriter # visitor must be initialized last after trainer is initialized self.experiment_duration = None self.model.set_saver(self.visitor) - self.model.save() + self.visitor.save() # self.model.save() cause CI infinite loop? def execute(self, num_epochs=None): """ From c9242cd265188305d50c46aaff9c0ec5be3eda08 Mon Sep 17 00:00:00 2001 From: Xudong Sun Date: Thu, 25 Jul 2024 18:06:42 +0200 Subject: [PATCH 4/4] Update exp_main.py --- domainlab/exp/exp_main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domainlab/exp/exp_main.py b/domainlab/exp/exp_main.py index ca2b6a535..a033bb734 100755 --- a/domainlab/exp/exp_main.py +++ b/domainlab/exp/exp_main.py @@ -59,13 +59,13 @@ def __init__(self, args, task=None, model=None, observer=None, visitor=AggWriter # visitor must be initialized last after trainer is initialized self.experiment_duration = None self.model.set_saver(self.visitor) - self.visitor.save() # self.model.save() cause CI infinite loop? - + def execute(self, num_epochs=None): """ train model check performance by loading persisted model """ + self.model.save() # cause CI infinite loop when put in initializer? if num_epochs is None: num_epochs = self.epochs + 1 t_0 = datetime.datetime.now()