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
f37adbcb
Verified
Commit
f37adbcb
authored
2 years ago
by
Yoann Schneider
Browse files
Options
Downloads
Patches
Plain Diff
fix lint
parent
faa7fffe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!60
Resume from existing mlflow run
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dan/ocr/document/train.py
+2
-28
2 additions, 28 deletions
dan/ocr/document/train.py
with
2 additions
and
28 deletions
dan/ocr/document/train.py
+
2
−
28
View file @
f37adbcb
...
...
@@ -24,11 +24,8 @@ try:
MLFLOW
=
True
logger
.
info
(
"
MLflow Logging available.
"
)
<<<<<<<
HEAD
from
dan.mlflow
import
make_mlflow_request
,
start_mlflow_run
=======
from
dan.mlflow
import
start_mlflow_run
,
make_mlflow_request
>>>>>>>
e8dfc5f
(
last
requests
)
except
ImportError
:
MLFLOW
=
False
...
...
@@ -75,15 +72,9 @@ def get_config():
"""
Retrieve model configuration
"""
<<<<<<<
HEAD
dataset_name
=
"
esposalles
"
dataset_level
=
"
record
"
dataset_variant
=
"
_debug
"
=======
dataset_name
=
"
synist
"
dataset_level
=
"
manual_text_lines
"
dataset_variant
=
""
>>>>>>>
e8dfc5f
(
last
requests
)
dataset_path
=
"
.
"
params
=
{
"
mlflow
"
:
{
...
...
@@ -303,42 +294,25 @@ def run():
/
"
labels.json
"
)
with
start_mlflow_run
(
config
[
"
mlflow
"
])
as
run
:
logger
.
info
(
f
"
Started MLflow run with ID (
{
run
.
info
.
run_id
}
)
"
)
<<<<<<<
HEAD
make_mlflow_request
(
mlflow_method
=
mlflow
.
set_tags
,
tags
=
{
"
Dataset
"
:
dataset_name
}
=======
logger
.
info
(
f
"
Started MLflow run with ID (
{
run
.
info
.
run_id
}
)
"
)
make_mlflow_request
(
mlflow_method
=
mlflow
.
set_tags
,
tags
=
{
"
Dataset
"
:
dataset_name
}
>>>>>>>
e8dfc5f
(
last
requests
)
)
# Get the labels json file
with
open
(
labels_path
)
as
json_file
:
labels_artifact
=
json
.
load
(
json_file
)
# Log MLflow artifacts
<<<<<<<
HEAD
for
artifact
,
filename
in
[
(
config_artifact
,
"
config.json
"
),
(
labels_artifact
,
"
labels.json
"
),
]:
=======
for
artifact
,
filename
in
[(
config_artifact
,
"
config.json
"
),
(
labels_artifact
,
"
labels.json
"
)]:
>>>>>>>
e8dfc5f
(
last
requests
)
make_mlflow_request
(
mlflow_method
=
mlflow
.
log_dict
,
dictionary
=
artifact
,
artifact_file
=
filename
,
)
<<<<<<<
HEAD
=======
>>>>>>>
e8dfc5f
(
last
requests
)
if
(
config
[
"
training_params
"
][
"
use_ddp
"
]
and
not
config
[
"
training_params
"
][
"
force_cpu
"
]
...
...
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