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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
e66e969c
Commit
e66e969c
authored
Dec 1, 2021
by
lukas leufen
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into 'lukas_issue339_feat_filter-with-future-mix'
Develop See merge request
!369
parents
66ecc664
8578459c
Branches
Branches containing commit
Tags
Tags containing commit
4 merge requests
!413
update release branch
,
!412
Resolve "release v2.0.0"
,
!369
Develop
,
!358
Resolve "filter with future mix"
Pipeline
#84926
failed
Dec 1, 2021
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mlair/plotting/postprocessing_plotting.py
+5
-6
5 additions, 6 deletions
mlair/plotting/postprocessing_plotting.py
mlair/run_modules/post_processing.py
+1
-1
1 addition, 1 deletion
mlair/run_modules/post_processing.py
mlair/run_modules/training.py
+2
-1
2 additions, 1 deletion
mlair/run_modules/training.py
with
8 additions
and
8 deletions
mlair/plotting/postprocessing_plotting.py
+
5
−
6
View file @
e66e969c
...
...
@@ -1042,7 +1042,6 @@ class PlotSeparationOfScales(AbstractPlotClass): # pragma: no cover
data
=
dh
.
get_X
(
as_numpy
=
False
)[
0
]
station
=
dh
.
id_class
.
station
[
0
]
data
=
data
.
sel
(
Stations
=
station
)
# plt.subplots()
data
.
plot
(
x
=
self
.
time_dim
,
y
=
self
.
window_dim
,
col
=
self
.
filter_dim
,
row
=
self
.
target_dim
,
robust
=
True
)
self
.
plot_name
=
f
"
{
orig_plot_name
}
_
{
station
}
"
self
.
_save
()
...
...
@@ -1085,9 +1084,8 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover
return
data
def
prepare_data
(
self
,
data
:
xr
.
DataArray
):
self
.
_data_table
=
data
.
to_pandas
()
if
"
persi
"
in
self
.
_data_table
.
columns
:
self
.
_data_table
[
"
persi
"
]
=
self
.
_data_table
.
pop
(
"
persi
"
)
data_table
=
data
.
to_pandas
()
self
.
_data_table
=
data_table
[
data_table
.
mean
().
sort_values
().
index
]
self
.
_n_boots
=
self
.
_data_table
.
shape
[
0
]
def
_apply_root
(
self
):
...
...
@@ -1102,7 +1100,7 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover
if
orientation
==
"
v
"
:
figsize
,
width
=
(
size
,
5
),
0.4
elif
orientation
==
"
h
"
:
figsize
,
width
=
(
6
,
(
1
+
.
5
*
size
)),
0.65
figsize
,
width
=
(
7
,
(
1
+
.
5
*
size
)),
0.65
else
:
raise
ValueError
(
f
"
orientation must be `v
'
or `h
'
but is:
{
orientation
}
"
)
fig
,
ax
=
plt
.
subplots
(
figsize
=
figsize
)
...
...
@@ -1119,7 +1117,8 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover
else
:
raise
ValueError
(
f
"
orientation must be `v
'
or `h
'
but is:
{
orientation
}
"
)
text
=
f
"
n=
{
n_boots
}
"
if
self
.
block_length
is
None
else
f
"
{
self
.
block_length
}
, n=
{
n_boots
}
"
text_box
=
AnchoredText
(
text
,
frameon
=
True
,
loc
=
1
,
pad
=
0.5
)
loc
=
"
upper right
"
if
orientation
==
"
h
"
else
"
upper left
"
text_box
=
AnchoredText
(
text
,
frameon
=
True
,
loc
=
loc
,
pad
=
0.5
)
plt
.
setp
(
text_box
.
patch
,
edgecolor
=
'
k
'
,
facecolor
=
'
w
'
)
ax
.
add_artist
(
text_box
)
plt
.
setp
(
ax
.
lines
,
color
=
'
k
'
)
...
...
This diff is collapsed.
Click to expand it.
mlair/run_modules/post_processing.py
+
1
−
1
View file @
e66e969c
...
...
@@ -427,7 +427,7 @@ class PostProcessing(RunEnvironment):
:return: the model
"""
try
:
try
:
# is only available if a model was trained in training stage
model
=
self
.
data_store
.
get
(
"
best_model
"
)
except
NameNotFoundInDataStore
:
logging
.
info
(
"
No model was saved in data store. Try to load model from experiment path.
"
)
...
...
This diff is collapsed.
Click to expand it.
mlair/run_modules/training.py
+
2
−
1
View file @
e66e969c
...
...
@@ -14,6 +14,7 @@ import psutil
import
pandas
as
pd
from
mlair.data_handler
import
KerasIterator
from
mlair.model_modules
import
AbstractModelClass
from
mlair.model_modules.keras_extensions
import
CallbackHandler
from
mlair.plotting.training_monitoring
import
PlotModelHistory
,
PlotModelLearningRate
from
mlair.run_modules.run_environment
import
RunEnvironment
...
...
@@ -67,7 +68,7 @@ class Training(RunEnvironment):
def
__init__
(
self
):
"""
Set up and run training.
"""
super
().
__init__
()
self
.
model
:
keras
.
Model
=
self
.
data_store
.
get
(
"
model
"
,
"
model
"
)
self
.
model
:
AbstractModelClass
=
self
.
data_store
.
get
(
"
model
"
,
"
model
"
)
self
.
train_set
:
Union
[
KerasIterator
,
None
]
=
None
self
.
val_set
:
Union
[
KerasIterator
,
None
]
=
None
# self.test_set: Union[KerasIterator, None] = None
...
...
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