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
OpenDAS
Megatron-LM
Commits
86e54454
Commit
86e54454
authored
Dec 13, 2021
by
zihanl
Browse files
restore to original main.py
parent
fc06e7a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
tasks/main.py
tasks/main.py
+0
-26
No files found.
tasks/main.py
View file @
86e54454
...
@@ -84,28 +84,6 @@ def get_tasks_args(parser):
...
@@ -84,28 +84,6 @@ def get_tasks_args(parser):
help
=
'Av.rank validation: how many other negatives to'
help
=
'Av.rank validation: how many other negatives to'
' take from each question pool'
)
' take from each question pool'
)
# parameters for the knowledgeable dialogue generation
group
.
add_argument
(
"--sample-input-file"
,
type
=
str
,
default
=
None
,
help
=
'Get input from file instead of interactive mode, '
'each line is an input.'
)
group
.
add_argument
(
"--sample-output-file"
,
type
=
str
,
default
=
None
,
help
=
'Output file got from --sample-input-file'
)
group
.
add_argument
(
'--prompt-file'
,
type
=
str
,
default
=
None
,
help
=
'prompting file'
)
group
.
add_argument
(
'--prompt-type'
,
type
=
str
,
default
=
None
,
help
=
'prompt type (knowledge or response)'
)
group
.
add_argument
(
'--num-prompt-examples'
,
type
=
int
,
default
=
10
,
help
=
'number of prompt examples'
)
group
.
add_argument
(
'--guess-file'
,
type
=
str
,
default
=
None
,
help
=
'datapath for generated sentences'
)
group
.
add_argument
(
'--answer-file'
,
type
=
str
,
default
=
None
,
help
=
'datapath for golden sentences'
)
group
.
add_argument
(
'--out-seq-length'
,
type
=
int
,
default
=
100
,
help
=
'output sequence length'
)
group
.
add_argument
(
'--api-prompt'
,
default
=
False
,
action
=
"store_true"
,
help
=
'setup model api for prompting'
)
group
.
add_argument
(
'--megatron-api-url'
,
type
=
str
,
default
=
None
,
help
=
'url of the megatron api'
)
return
parser
return
parser
...
@@ -130,10 +108,6 @@ if __name__ == '__main__':
...
@@ -130,10 +108,6 @@ if __name__ == '__main__':
from
orqa.evaluate_orqa
import
main
from
orqa.evaluate_orqa
import
main
elif
args
.
task
in
[
'RET-FINETUNE-NQ'
]:
elif
args
.
task
in
[
'RET-FINETUNE-NQ'
]:
from
orqa.supervised.finetune
import
main
from
orqa.supervised.finetune
import
main
elif
args
.
task
==
'KNWL-DIALO-PROMPT'
:
from
knwl_dialo.prompt
import
main
elif
args
.
task
==
'KNWL-DIALO-EVAL-F1'
:
from
knwl_dialo.evaluate
import
main
else
:
else
:
raise
NotImplementedError
(
'Task {} is not implemented.'
.
format
(
raise
NotImplementedError
(
'Task {} is not implemented.'
.
format
(
args
.
task
))
args
.
task
))
...
...
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