Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Administrator
metaseq
Commits
4bf2d3bc
Commit
4bf2d3bc
authored
2 years ago
by
Ruan Silva
Browse files
Options
Download
Email Patches
Plain Diff
run black to fix #411
parent
660894a1
linter
1 merge request
!485
run black to fix #411
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
metaseq/cli/train.py
+1
-1
metaseq/cli/train.py
metaseq/dataclass/configs.py
+3
-1
metaseq/dataclass/configs.py
with
4 additions
and
2 deletions
+4
-2
metaseq/cli/train.py
+
1
-
1
View file @
4bf2d3bc
...
@@ -505,7 +505,7 @@ def _run_evaluations(
...
@@ -505,7 +505,7 @@ def _run_evaluations(
return
return
assert
eval_module
is
not
None
,
"--eval-module needs to be set."
assert
eval_module
is
not
None
,
"--eval-module needs to be set."
module
=
importlib
.
import_module
(
eval_module
)
module
=
importlib
.
import_module
(
eval_module
)
if
not
hasattr
(
module
,
'
eval_fn
'
):
if
not
hasattr
(
module
,
"
eval_fn
"
):
raise
RuntimeError
(
raise
RuntimeError
(
f
"
{
eval_module
}
must have a function called eval_fn to utilize for evaluations. "
f
"
{
eval_module
}
must have a function called eval_fn to utilize for evaluations. "
"It expects the following signature:
\n
"
"It expects the following signature:
\n
"
...
...
This diff is collapsed.
Click to expand it.
metaseq/dataclass/configs.py
+
3
-
1
View file @
4bf2d3bc
...
@@ -509,7 +509,9 @@ class CheckpointConfig(MetaseqDataclass):
...
@@ -509,7 +509,9 @@ class CheckpointConfig(MetaseqDataclass):
)
)
evaluate_last_checkpoint
:
bool
=
field
(
evaluate_last_checkpoint
:
bool
=
field
(
default
=
False
,
default
=
False
,
metadata
=
{
"help"
:
"run the eval_fn from eval_module at the end of the training run"
},
metadata
=
{
"help"
:
"run the eval_fn from eval_module at the end of the training run"
},
)
)
keep_last_epochs
:
int
=
field
(
keep_last_epochs
:
int
=
field
(
default
=-
1
,
metadata
=
{
"help"
:
"keep only the last N epoch checkpoints"
}
default
=-
1
,
metadata
=
{
"help"
:
"keep only the last N epoch checkpoints"
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets