Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
908f8536
Unverified
Commit
908f8536
authored
Aug 22, 2023
by
AleksanderWWW
Committed by
GitHub
Aug 22, 2023
Browse files
stringify config (#25637)
* stringify config * apply code formatting
parent
5eeaef92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/transformers/integrations.py
src/transformers/integrations.py
+5
-1
No files found.
src/transformers/integrations.py
View file @
908f8536
...
@@ -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"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment