Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dayabay-model
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
dayabay-data-preservation
dayabay-model
Commits
bbe2bef9
Commit
bbe2bef9
authored
1 year ago
by
Maxim Gonchar
Browse files
Options
Downloads
Patches
Plain Diff
feat: add labels
parent
4610e24e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
model_tools/parameters_storage.py
+1
-10
1 addition, 10 deletions
model_tools/parameters_storage.py
models/dayabay_v0.py
+4
-2
4 additions, 2 deletions
models/dayabay_v0.py
with
5 additions
and
12 deletions
model_tools/parameters_storage.py
+
1
−
10
View file @
bbe2bef9
...
...
@@ -31,24 +31,15 @@ class ParametersStorage(NestedMKDict):
def
plot
(
self
,
*
args
,
close
:
bool
=
True
,
show
:
bool
=
True
,
**
kwargs
)
->
None
:
from
dagflow.plot
import
plot_auto
if
close
:
from
matplotlib.pyplot
import
close
if
show
:
from
matplotlib.pyplot
import
show
for
key
,
value
in
self
.
walkitems
():
for
_
,
value
in
self
.
walkitems
():
if
not
isinstance
(
value
,
Output
):
continue
plot_auto
(
value
,
*
args
,
**
kwargs
)
if
show
:
show
()
if
close
:
close
()
def
to_list
(
self
,
**
kwargs
)
->
list
:
return
self
.
visit
(
ParametersVisitor
(
kwargs
)).
data_list
...
...
This diff is collapsed.
Click to expand it.
models/dayabay_v0.py
+
4
−
2
View file @
bbe2bef9
...
...
@@ -4,6 +4,7 @@ from pathlib import Path
from
dagflow.graph
import
Graph
from
dagflow.graphviz
import
savegraph
from
dagflow.lib.arithmetic
import
Sum
from
dagflow.tools.schema
import
LoadYaml
from
gindex
import
GNIndex
from
model_tools.parameters_storage
import
ParametersStorage
...
...
@@ -60,8 +61,9 @@ def model_dayabay_v0():
from
dagflow.lib.Array
import
Array
from
dagflow.lib.View
import
View
from
numpy
import
linspace
outputs
[
'
edges.energy_common
'
]
=
(
energy_edges
:
=
Array
(
"
energy_edges
"
,
linspace
(
0
,
12
,
241
)).
outputs
[
0
])
outputs
[
'
edges.energy_evis
'
]
=
(
energy_evis
:
=
View
(
"
energy_evis
"
).
outputs
[
0
])
labels
=
LoadYaml
(
datasource
/
'
labels.yaml
'
)
outputs
[
'
edges.energy_common
'
]
=
(
energy_edges
:
=
Array
(
"
energy_edges
"
,
linspace
(
0
,
12
,
241
),
label
=
labels
[
'
energy_common
'
]).
outputs
[
0
])
outputs
[
'
edges.energy_evis
'
]
=
(
energy_evis
:
=
View
(
"
energy_evis
"
,
label
=
labels
[
'
energy_evis
'
]).
outputs
[
0
])
energy_edges
>>
energy_evis
.
node
storage
.
read_paths
()
...
...
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