Skip to content

Commit

Permalink
Add and remove codecarbon config after pause
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFehring committed Mar 7, 2024
1 parent 39a96c8 commit ca7e5f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py_experimenter/experimenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,13 @@ def unpause_experiment(self, experiment_id: int, experiment_function: Callable)
:param experiment_function: _description_ The experiment function to use to continue the given experiment
:type experiment_function: Callable
"""
self._write_codecarbon_config()

keyfield_dict, _ = self.db_connector.pull_paused_experiment(experiment_id)
self._execute_experiment(experiment_id, keyfield_dict, experiment_function)

self._delete_codecarbon_config()

def _worker(self, experiment_function: Callable[[Dict, Dict, ResultProcessor], None], random_order: bool) -> None:
"""
Worker that repeatedly pulls open experiments from the database table and executes them.
Expand Down

0 comments on commit ca7e5f0

Please sign in to comment.