Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
ee7569ab
Commit
ee7569ab
authored
4 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
training reports now too
parent
270c9027
Branches
Branches containing commit
Tags
Tags containing commit
4 merge requests
!125
Release v0.10.0
,
!124
Update Master to new version v0.10.0
,
!122
Resolve "ML param reporting"
,
!119
Resolve "Include advanced data handling in workflow"
Pipeline
#41034
failed
4 years ago
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mlair/run_modules/model_setup.py
+3
-1
3 additions, 1 deletion
mlair/run_modules/model_setup.py
mlair/run_modules/training.py
+19
-0
19 additions, 0 deletions
mlair/run_modules/training.py
with
22 additions
and
1 deletion
mlair/run_modules/model_setup.py
+
3
−
1
View file @
ee7569ab
...
...
@@ -13,6 +13,7 @@ import tensorflow as tf
from
mlair.model_modules.keras_extensions
import
HistoryAdvanced
,
CallbackHandler
from
mlair.run_modules.run_environment
import
RunEnvironment
from
mlair.configuration
import
path_config
class
ModelSetup
(
RunEnvironment
):
...
...
@@ -162,7 +163,8 @@ class ModelSetup(RunEnvironment):
df
.
loc
[
k
]
=
v
df
.
sort_index
(
inplace
=
True
)
column_format
=
"
ll
"
path
=
self
.
data_store
.
get
(
"
model_path
"
)
path
=
os
.
path
.
join
(
self
.
data_store
.
get
(
"
experiment_path
"
),
"
latex_report
"
)
path_config
.
check_path_and_create
(
path
)
df
.
to_latex
(
os
.
path
.
join
(
path
,
"
model_settings.tex
"
),
na_rep
=
'
---
'
,
column_format
=
column_format
)
df
.
to_markdown
(
open
(
os
.
path
.
join
(
path
,
"
model_settings.md
"
),
mode
=
"
w
"
,
encoding
=
'
utf-8
'
),
tablefmt
=
"
github
"
)
...
...
This diff is collapsed.
Click to expand it.
mlair/run_modules/training.py
+
19
−
0
View file @
ee7569ab
...
...
@@ -15,6 +15,7 @@ from mlair.data_handling import Distributor
from
mlair.model_modules.keras_extensions
import
CallbackHandler
from
mlair.plotting.training_monitoring
import
PlotModelHistory
,
PlotModelLearningRate
from
mlair.run_modules.run_environment
import
RunEnvironment
from
mlair.configuration
import
path_config
class
Training
(
RunEnvironment
):
...
...
@@ -82,6 +83,7 @@ class Training(RunEnvironment):
if
self
.
_trainable
:
self
.
train
()
self
.
save_model
()
self
.
report_training
()
else
:
logging
.
info
(
"
No training has started, because trainable parameter was false.
"
)
...
...
@@ -228,3 +230,20 @@ class Training(RunEnvironment):
# plot learning rate
if
lr_sc
:
PlotModelLearningRate
(
filename
=
os
.
path
.
join
(
path
,
f
"
{
name
}
_history_learning_rate.pdf
"
),
lr_sc
=
lr_sc
)
def
report_training
(
self
):
data
=
{
"
mini batches
"
:
len
(
self
.
train_set
),
"
upsampling extremes
"
:
self
.
train_set
.
upsampling
,
"
shuffling
"
:
self
.
train_set
.
do_data_permutation
,
"
created new model
"
:
self
.
_create_new_model
,
"
epochs
"
:
self
.
epochs
,
"
batch size
"
:
self
.
batch_size
}
import
pandas
as
pd
df
=
pd
.
DataFrame
.
from_dict
(
data
,
orient
=
"
index
"
,
columns
=
[
"
training setting
"
])
df
.
sort_index
(
inplace
=
True
)
column_format
=
"
ll
"
path
=
os
.
path
.
join
(
self
.
data_store
.
get
(
"
experiment_path
"
),
"
latex_report
"
)
path_config
.
check_path_and_create
(
path
)
df
.
to_latex
(
os
.
path
.
join
(
path
,
"
training_settings.tex
"
),
na_rep
=
'
---
'
,
column_format
=
column_format
)
df
.
to_markdown
(
open
(
os
.
path
.
join
(
path
,
"
training_settings.md
"
),
mode
=
"
w
"
,
encoding
=
'
utf-8
'
),
tablefmt
=
"
github
"
)
\ No newline at end of file
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