Toggle navigation
Toggle navigation
This project
Loading...
Sign in
graykode
/
commit-autosuggestions
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
graykode
2020-09-08 15:38:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b838bdadaf1922674f42ad82ca79baf6cfb26012
b838bdad
1 parent
957d75b4
(refactor) argument renaming, add region, do_train and do_predict arguments in finetune.py
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
finetune.py
finetune.py
View file @
b838bda
...
...
@@ -212,9 +212,10 @@ class SummarizationModule(BaseTransformer):
def
get_dataset
(
self
,
type_path
)
->
Seq2SeqDataset
:
max_target_length
=
self
.
target_lens
[
type_path
]
data_config
=
DataConfig
(
endpoint
=
args
.
matorage_dir
,
endpoint
=
args
.
endpoint
,
access_key
=
os
.
environ
[
'access_key'
],
secret_key
=
os
.
environ
[
'secret_key'
],
region
=
args
.
region
,
dataset_name
=
'commit-autosuggestions'
,
additional
=
{
"mode"
:
(
"training"
if
type_path
==
"train"
else
"evaluation"
),
...
...
@@ -265,10 +266,16 @@ class SummarizationModule(BaseTransformer):
help
=
"github url"
)
parser
.
add_argument
(
"--
matorage_dir
"
,
"--
endpoint
"
,
type
=
str
,
required
=
True
,
help
=
'matorage saved directory.'
help
=
'matorage endpoint, check document of matorage: https://matorage.readthedocs.io/en/stable/storage.html'
)
parser
.
add_argument
(
"--region"
,
type
=
str
,
default
=
None
,
help
=
'matorage s3 region, check document of matorage: https://matorage.readthedocs.io/en/stable/storage.html'
)
parser
.
add_argument
(
"--max_source_length"
,
...
...
Please
register
or
login
to post a comment