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
5257818e
Unverified
Commit
5257818e
authored
Jun 30, 2021
by
Shamane Siri
Committed by
GitHub
Jun 29, 2021
Browse files
minor fixes in original RAG training (#12395)
parent
e3f39a29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/research_projects/rag/callbacks_rag.py
examples/research_projects/rag/callbacks_rag.py
+1
-1
examples/research_projects/rag/finetune_rag.py
examples/research_projects/rag/finetune_rag.py
+2
-2
No files found.
examples/research_projects/rag/callbacks_rag.py
View file @
5257818e
...
@@ -36,7 +36,7 @@ def get_checkpoint_callback(output_dir, metric):
...
@@ -36,7 +36,7 @@ def get_checkpoint_callback(output_dir, metric):
dirpath
=
output_dir
,
dirpath
=
output_dir
,
filename
=
exp
,
filename
=
exp
,
monitor
=
f
"val_
{
metric
}
"
,
monitor
=
f
"val_
{
metric
}
"
,
mode
=
"m
in
"
,
mode
=
"m
ax
"
,
save_top_k
=
3
,
save_top_k
=
3
,
period
=
1
,
# maybe save a checkpoint every time val is run, not just end of epoch.
period
=
1
,
# maybe save a checkpoint every time val is run, not just end of epoch.
)
)
...
...
examples/research_projects/rag/finetune_rag.py
View file @
5257818e
...
@@ -532,8 +532,8 @@ def main(args=None, model=None) -> GenerativeQAModule:
...
@@ -532,8 +532,8 @@ def main(args=None, model=None) -> GenerativeQAModule:
raise
raise
# Create Ray actors only for rank 0.
# Create Ray actors only for rank 0.
if
(
"LOCAL_RANK"
not
in
os
.
environ
or
os
.
environ
[
"LOCAL_RANK"
]
==
0
)
and
(
if
(
"LOCAL_RANK"
not
in
os
.
environ
or
int
(
os
.
environ
[
"LOCAL_RANK"
]
)
==
0
)
and
(
"NODE_RANK"
not
in
os
.
environ
or
os
.
environ
[
"NODE_RANK"
]
==
0
"NODE_RANK"
not
in
os
.
environ
or
int
(
os
.
environ
[
"NODE_RANK"
]
)
==
0
):
):
remote_cls
=
ray
.
remote
(
RayRetriever
)
remote_cls
=
ray
.
remote
(
RayRetriever
)
named_actors
=
[
named_actors
=
[
...
...
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