Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
c24d252e
Commit
c24d252e
authored
1 year ago
by
Maja Jablonska
Browse files
Options
Downloads
Patches
Plain Diff
Small changes to creating existing paths
parent
60cac6c5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!46
Merge COMBO 3.0 into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
combo/main.py
+12
-3
12 additions, 3 deletions
combo/main.py
with
12 additions
and
3 deletions
combo/main.py
+
12
−
3
View file @
c24d252e
...
...
@@ -282,7 +282,10 @@ def run(_):
'
to use default models.
'
)
return
pathlib
.
Path
(
FLAGS
.
serialization_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
try
:
pathlib
.
Path
(
FLAGS
.
serialization_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
except
FileExistsError
:
pass
serialization_dir
=
tempfile
.
mkdtemp
(
prefix
=
'
combo
'
,
dir
=
FLAGS
.
serialization_dir
)
else
:
...
...
@@ -304,7 +307,10 @@ def run(_):
vocabulary
=
model
.
vocab
pathlib
.
Path
(
FLAGS
.
serialization_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
try
:
pathlib
.
Path
(
FLAGS
.
serialization_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
except
FileExistsError
:
pass
serialization_dir
=
tempfile
.
mkdtemp
(
prefix
=
'
combo
'
,
suffix
=
'
-finetuning
'
,
dir
=
FLAGS
.
serialization_dir
)
dataset_reader
,
training_data_loader
,
validation_data_loader
,
vocabulary
=
get_defaults
(
...
...
@@ -371,7 +377,10 @@ def run(_):
except
ConfigurationError
as
e
:
handle_error
(
e
,
prefix
)
pathlib
.
Path
(
FLAGS
.
output_file
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
try
:
pathlib
.
Path
(
FLAGS
.
output_file
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
except
FileExistsError
:
pass
logger
.
info
(
"
Predicting examples from file
"
,
prefix
=
prefix
)
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment