Ejemplo n.º 1
0
    def __init__(
        self,
        settings: Union["wandb_settings.Settings", Dict[str, Any],
                        None] = None,
        environ: Optional[Dict[str, Any]] = None,
        pid: Optional[int] = None,
    ):
        self._environ = environ or dict(os.environ)
        self._sweep_config = None
        self._config = None
        self._server = None
        self._manager = None
        self._pid = pid

        # keep track of multiple runs so we can unwind with join()s
        self._global_run_stack = []

        # TODO(jhr): defer strict checks until settings are fully initialized
        #            and logging is ready
        self._early_logger = _EarlyLogger()
        _set_logger(self._early_logger)

        self._settings = self._settings_setup(settings, self._early_logger)
        # self._settings.freeze()

        wandb.termsetup(self._settings, logger)

        self._check()
        self._setup()

        tracelog_mode = self._settings._tracelog
        if tracelog_mode:
            tracelog.enable(tracelog_mode)
Ejemplo n.º 2
0
    def __init__(self, settings=None, environ=None):
        self._settings = None
        self._environ = environ or dict(os.environ)
        self._sweep_config = None
        self._config = None
        self._server = None

        # keep track of multiple runs so we can unwind with join()s
        self._global_run_stack = []

        # TODO(jhr): defer strict checks until settings are fully initialized
        #            and logging is ready
        self._early_logger = _EarlyLogger()
        _set_logger(self._early_logger)

        self._settings_setup(settings, self._early_logger)
        self._settings.freeze()

        wandb.termsetup(self._settings, logger)

        self._check()
        self._setup()