Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
beat
beat.core
Commits
58656e80
Commit
58656e80
authored
6 years ago
by
Samuel GAIST
Browse files
Options
Downloads
Patches
Plain Diff
[experiment] Code cleanup
parent
765f49d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!62
Code cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/core/experiment.py
+6
-9
6 additions, 9 deletions
beat/core/experiment.py
with
6 additions
and
9 deletions
beat/core/experiment.py
+
6
−
9
View file @
58656e80
...
...
@@ -231,9 +231,9 @@ class Experiment(object):
if
data
is
None
:
# loads prototype and validates it
experiment_data
,
self
.
errors
=
prototypes
.
load
(
"
experiment
"
)
assert
not
self
.
errors
,
"
\n
* %s
"
%
"
\n
*
"
.
join
(
self
.
errors
)
assert
not
self
.
errors
,
"
\n
* %s
"
%
"
\n
*
"
.
join
(
self
.
errors
)
# nosec
toolchain_data
,
self
.
errors
=
prototypes
.
load
(
"
toolchain
"
)
assert
not
self
.
errors
,
"
\n
* %s
"
%
"
\n
*
"
.
join
(
self
.
errors
)
assert
not
self
.
errors
,
"
\n
* %s
"
%
"
\n
*
"
.
join
(
self
.
errors
)
# nosec
elif
isinstance
(
data
,
(
tuple
,
list
)):
# the user has passed a tuple
...
...
@@ -477,7 +477,7 @@ class Experiment(object):
self
.
errors
.
append
(
"
/loop/%s/nb_slots: you have set the number
"
"
of slots for algorithm `%s
'
to %d, but it is not
"
"
splittable
"
%
(
a
nalyzer
name
,
thisalgo
.
name
,
loop
[
"
nb_slots
"
])
"
splittable
"
%
(
a
lgo
name
,
thisalgo
.
name
,
loop
[
"
nb_slots
"
])
)
# check parameter consistence
...
...
@@ -740,7 +740,7 @@ class Experiment(object):
from_dtype
=
self
.
algorithms
[
block
[
"
algorithm
"
]].
output_map
[
algout
]
from_name
=
"
block
"
else
:
self
.
errors
.
append
(
"
Unknown endpoint %s
"
%
to
_endpt
[
0
])
self
.
errors
.
append
(
"
Unknown endpoint %s
"
%
from
_endpt
[
0
])
continue
to_endpt
=
connection
[
"
to
"
].
split
(
"
.
"
,
1
)
...
...
@@ -869,7 +869,7 @@ class Experiment(object):
# for the grouping properties for the inputs
# create channel groups
chain_
in
=
collections
.
Counter
(
input_connections
)
chain_
groups
=
collections
.
Counter
(
input_connections
)
# now check the algorithm for conformance
algo_groups
=
self
.
algorithms
[
self
.
analyzers
[
name
][
"
algorithm
"
]].
groups
...
...
@@ -926,7 +926,7 @@ class Experiment(object):
)
# makes sure we don't have multiple incomming connections
assert
len
(
_connections
)
==
len
(
connections
),
(
assert
len
(
_connections
)
==
len
(
connections
),
(
# nosec
"
detected multiple input
"
"
connections for block `%s
'
on experiment `%s
'"
%
(
name
,
self
.
label
)
)
...
...
@@ -975,7 +975,6 @@ class Experiment(object):
# then go one by one generating the input **and** output hashes
# until all is done.
block_config
=
self
.
blocks
[
block
]
retval
[
algo_endpt
]
=
{
"
from
"
:
"
%s.%s
"
%
(
block
,
output
),
"
channel
"
:
channel
,
...
...
@@ -1181,8 +1180,6 @@ class Experiment(object):
def
dot_diagram
(
self
):
"""
Returns a dot diagram representation of the experiment
"""
from
.drawing
import
create_port_table
title
=
"
Experiment: %s
"
%
self
.
label
def
__label_callback
(
type
,
name
):
...
...
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