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
febd62e6
Commit
febd62e6
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
added custom_object loading to post-processing
parent
090e1e08
No related branches found
No related tags found
3 merge requests
!90
WIP: new release update
,
!89
Resolve "release branch / CI on gpu"
,
!70
Resolve "Update custom_objects to reload models"
Pipeline
#31843
passed
5 years ago
Stage: test
Stage: pages
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/run_modules/post_processing.py
+3
-1
3 additions, 1 deletion
src/run_modules/post_processing.py
with
3 additions
and
1 deletion
src/run_modules/post_processing.py
+
3
−
1
View file @
febd62e6
...
@@ -17,6 +17,7 @@ from src.data_handling.bootstraps import BootStraps
...
@@ -17,6 +17,7 @@ from src.data_handling.bootstraps import BootStraps
from
src.datastore
import
NameNotFoundInDataStore
from
src.datastore
import
NameNotFoundInDataStore
from
src.helpers
import
TimeTracking
from
src.helpers
import
TimeTracking
from
src.model_modules.linear_model
import
OrdinaryLeastSquaredModel
from
src.model_modules.linear_model
import
OrdinaryLeastSquaredModel
from
src.model_modules.model_class
import
AbstractModelClass
from
src.plotting.postprocessing_plotting
import
PlotMonthlySummary
,
PlotStationMap
,
PlotClimatologicalSkillScore
,
\
from
src.plotting.postprocessing_plotting
import
PlotMonthlySummary
,
PlotStationMap
,
PlotClimatologicalSkillScore
,
\
PlotCompetitiveSkillScore
,
PlotTimeSeries
,
PlotBootstrapSkillScore
PlotCompetitiveSkillScore
,
PlotTimeSeries
,
PlotBootstrapSkillScore
from
src.plotting.postprocessing_plotting
import
plot_conditional_quantiles
from
src.plotting.postprocessing_plotting
import
plot_conditional_quantiles
...
@@ -117,7 +118,8 @@ class PostProcessing(RunEnvironment):
...
@@ -117,7 +118,8 @@ class PostProcessing(RunEnvironment):
except
NameNotFoundInDataStore
:
except
NameNotFoundInDataStore
:
logging
.
info
(
"
no model saved in data store. trying to load model from experiment path
"
)
logging
.
info
(
"
no model saved in data store. trying to load model from experiment path
"
)
model_name
=
self
.
data_store
.
get
(
"
model_name
"
,
"
general.model
"
)
model_name
=
self
.
data_store
.
get
(
"
model_name
"
,
"
general.model
"
)
model
=
keras
.
models
.
load_model
(
model_name
)
model_class
:
AbstractModelClass
=
self
.
data_store
.
get
(
"
model
"
,
"
general.model
"
)
model
=
keras
.
models
.
load_model
(
model_name
,
custom_objects
=
model_class
.
custom_objects
)
return
model
return
model
def
plot
(
self
):
def
plot
(
self
):
...
...
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