Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alibylite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Swain Lab
aliby
alibylite
Commits
cdf085ae
Commit
cdf085ae
authored
3 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
bugfix and add reporter
parent
d236804b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aliby/experiment.py
+1
-1
1 addition, 1 deletion
aliby/experiment.py
aliby/pipeline.py
+19
-1
19 additions, 1 deletion
aliby/pipeline.py
with
20 additions
and
2 deletions
aliby/experiment.py
+
1
−
1
View file @
cdf085ae
...
@@ -120,7 +120,7 @@ class MetaData:
...
@@ -120,7 +120,7 @@ class MetaData:
)
)
def
add_fields
(
self
,
fields_values
:
dict
):
def
add_fields
(
self
,
fields_values
:
dict
):
for
field
,
value
in
field_values
.
items
():
for
field
,
value
in
field
s
_values
.
items
():
self
.
add_field
(
field
,
value
)
self
.
add_field
(
field
,
value
)
...
...
This diff is collapsed.
Click to expand it.
aliby/pipeline.py
+
19
−
1
View file @
cdf085ae
...
@@ -29,6 +29,7 @@ from agora.io.signal import Signal
...
@@ -29,6 +29,7 @@ from agora.io.signal import Signal
from
extraction.core.extractor
import
Extractor
,
ExtractorParameters
from
extraction.core.extractor
import
Extractor
,
ExtractorParameters
from
extraction.core.functions.defaults
import
exparams_from_meta
from
extraction.core.functions.defaults
import
exparams_from_meta
from
postprocessor.core.processor
import
PostProcessor
,
PostProcessorParameters
from
postprocessor.core.processor
import
PostProcessor
,
PostProcessorParameters
from
postprocessor.compiler
import
ExperimentCompiler
,
PageOrganiser
logging
.
basicConfig
(
logging
.
basicConfig
(
filename
=
"
aliby.log
"
,
filename
=
"
aliby.log
"
,
...
@@ -82,7 +83,7 @@ class PipelineParameters(ParametersABC):
...
@@ -82,7 +83,7 @@ class PipelineParameters(ParametersABC):
id
=
expt_id
,
id
=
expt_id
,
distributed
=
0
,
distributed
=
0
,
tps
=
tps
,
tps
=
tps
,
directory
=
directory
,
directory
=
str
(
directory
)
,
strain
=
""
,
strain
=
""
,
earlystop
=
dict
(
earlystop
=
dict
(
min_tp
=
180
,
min_tp
=
180
,
...
@@ -130,6 +131,13 @@ class Pipeline(ProcessABC):
...
@@ -130,6 +131,13 @@ class Pipeline(ProcessABC):
# for other processes
# for other processes
return
cls
(
parameters
=
PipelineParameters
.
from_yaml
(
fpath
))
return
cls
(
parameters
=
PipelineParameters
.
from_yaml
(
fpath
))
@classmethod
def
from_existing_h5
(
cls
,
fpath
):
with
h5py
.
File
(
fpath
,
"
r
"
)
as
f
:
pipeline_parameters
=
PipelineParameters
.
from_yaml
(
f
.
attrs
[
"
parameters
"
])
return
cls
(
pipeline_parameters
)
def
run
(
self
):
def
run
(
self
):
# Config holds the general information, use in main
# Config holds the general information, use in main
# Steps holds the description of tasks with their parameters
# Steps holds the description of tasks with their parameters
...
@@ -302,6 +310,7 @@ class Pipeline(ProcessABC):
...
@@ -302,6 +310,7 @@ class Pipeline(ProcessABC):
self
.
parameters
.
postprocessing
self
.
parameters
.
postprocessing
).
to_dict
()
).
to_dict
()
PostProcessor
(
filename
,
post_proc_params
).
run
()
PostProcessor
(
filename
,
post_proc_params
).
run
()
return
True
return
True
except
Exception
as
e
:
# bug in the trap getting
except
Exception
as
e
:
# bug in the trap getting
logging
.
exception
(
logging
.
exception
(
...
@@ -317,6 +326,15 @@ class Pipeline(ProcessABC):
...
@@ -317,6 +326,15 @@ class Pipeline(ProcessABC):
if
session
:
if
session
:
session
.
close
()
session
.
close
()
try
:
compiler
=
ExperimentCompiler
(
None
,
filepath
)
tmp
=
compiler
.
run
()
po
=
PageOrganiser
(
tmp
,
grid_spec
=
(
3
,
2
))
po
.
plot
()
po
.
save
(
fullpath
/
f
"
{
directory
}
report.pdf
"
)
except
Exception
as
e
:
print
(
e
)
def
check_earlystop
(
self
,
filename
,
es_parameters
):
def
check_earlystop
(
self
,
filename
,
es_parameters
):
s
=
Signal
(
filename
)
s
=
Signal
(
filename
)
df
=
s
[
"
/extraction/general/None/area
"
]
df
=
s
[
"
/extraction/general/None/area
"
]
...
...
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