Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Commits
ab274366
Verified
Commit
ab274366
authored
2 years ago
by
Yoann Schneider
Browse files
Options
Downloads
Patches
Plain Diff
allow resuming from existing run
parent
a7fd22ad
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dan/mlflow.py
+13
-1
13 additions, 1 deletion
dan/mlflow.py
dan/ocr/document/train.py
+1
-1
1 addition, 1 deletion
dan/ocr/document/train.py
with
14 additions
and
2 deletions
dan/mlflow.py
+
13
−
1
View file @
ab274366
...
...
@@ -91,10 +91,22 @@ def start_mlflow_run(config: dict):
# Set needed variables in environment
setup_environment
(
config
)
run_name
,
run_id
=
config
.
get
(
"
run_name
"
),
config
.
get
(
"
run_id
"
)
if
run_id
:
logger
.
info
(
f
"
Will resume run (
{
run_id
}
).
"
)
if
run_name
:
logger
.
warning
(
"
Run_name will be ignored since you specified a run_id to resume from.
"
)
# Set experiment from config
experiment_id
=
config
.
get
(
"
experiment_id
"
)
assert
experiment_id
,
"
Missing MLflow experiment ID in the configuration
"
# Start run
yield
mlflow
.
start_run
(
run_name
=
config
.
get
(
"
run_name
"
),
experiment_id
=
experiment_id
)
yield
mlflow
.
start_run
(
run_id
=
run_id
,
run_name
=
run_name
,
experiment_id
=
experiment_id
)
mlflow
.
end_run
()
This diff is collapsed.
Click to expand it.
dan/ocr/document/train.py
+
1
−
1
View file @
ab274366
...
...
@@ -76,8 +76,8 @@ def get_config():
dataset_path
=
"
.
"
params
=
{
"
mlflow
"
:
{
"
dataset_name
"
:
dataset_name
,
"
run_name
"
:
"
Test log DAN
"
,
"
run_id
"
:
None
,
"
s3_endpoint_url
"
:
""
,
"
tracking_uri
"
:
""
,
"
experiment_id
"
:
"
0
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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