small fixes (#581)

* small fix

* oom error

* created model wrapper; make DDP working again; todo need to check if it works with viewer

* working with multigpu now
This commit is contained in:
evonneng authored and GitHub committed 2022-10-02 13:54:13 -07:00
1 parent 3489e992b0
commit 50d9aa1341
7 files changed
+38 -23

No files matched your search

+2 -2
View File
@@ -50,11 +50,11 @@ def check_profiler_enabled(func: Callable) -> Callable:
def check_viewer_enabled(func: Callable) -> Callable:
"""Decorator: check if viewer is enabled"""
"""Decorator: check if viewer is enabled and only run on main process"""
def wrapper(self, *args, **kwargs):
ret = None
if self.config.is_viewer_enabled():
if self.config.is_viewer_enabled() and comms.is_main_process():
ret = func(self, *args, **kwargs)
return ret
+1
View File
@@ -190,6 +190,7 @@ def setup_local_writer(config: cfg.LoggingConfig, max_iter: int, banner_messages
GLOBAL_BUFFER["events"] = {}
@check_main_thread
def setup_event_writer(config: cfg.Config, log_dir: Path) -> None:
"""Initialization of all event writers specified in config