updated event writing logic/moved save and print to after config set (#502)

* (1) if wandb/tb enabled always eval; (2) move printing of config to after all variables set

* (3) save config after everything is set

* dont change config; just disable eval with decorator
This commit is contained in:
evonneng authored and GitHub committed 2022-09-21 13:40:56 -07:00
1 parent 7cf97348ee
commit 0c43e7c4b2
4 files changed
+83 -47

No files matched your search

+12
View File
@@ -61,6 +61,18 @@ def check_viewer_enabled(func: Callable) -> Callable:
return wrapper
def check_eval_enabled(func: Callable) -> Callable:
"""Decorator: check if evaluation step is enabled"""
def wrapper(self, *args, **kwargs):
ret = None
if self.config.logging.event_writer != "none":
ret = func(self, *args, **kwargs)
return ret
return wrapper
def check_main_thread(func: Callable) -> Callable:
"""Decorator: check if you are on main thread"""