"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "5e8c8eb5bad1d43212b2e8bf724114fe5cdfd807"
Unverified Commit 908f8536 authored by AleksanderWWW's avatar AleksanderWWW Committed by GitHub
Browse files

stringify config (#25637)

* stringify config

* apply code formatting
parent 5eeaef92
...@@ -1282,8 +1282,12 @@ class NeptuneCallback(TrainerCallback): ...@@ -1282,8 +1282,12 @@ class NeptuneCallback(TrainerCallback):
self._metadata_namespace[NeptuneCallback.trainer_parameters_key] = args.to_sanitized_dict() self._metadata_namespace[NeptuneCallback.trainer_parameters_key] = args.to_sanitized_dict()
def _log_model_parameters(self, model): def _log_model_parameters(self, model):
from neptune.utils import stringify_unsupported
if model and hasattr(model, "config") and model.config is not None: if model and hasattr(model, "config") and model.config is not None:
self._metadata_namespace[NeptuneCallback.model_parameters_key] = model.config.to_dict() self._metadata_namespace[NeptuneCallback.model_parameters_key] = stringify_unsupported(
model.config.to_dict()
)
def _log_hyper_param_search_parameters(self, state): def _log_hyper_param_search_parameters(self, state):
if state and hasattr(state, "trial_name"): if state and hasattr(state, "trial_name"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment