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
3e8e65dd
Commit
3e8e65dd
authored
7 years ago
by
Philip ABBET
Browse files
Options
Downloads
Patches
Plain Diff
[executor] Add more checks to ensure the JSON configuration is valid
parent
3c0ca8ab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/core/execution/base.py
+18
-0
18 additions, 0 deletions
beat/core/execution/base.py
with
18 additions
and
0 deletions
beat/core/execution/base.py
+
18
−
0
View file @
3e8e65dd
...
@@ -183,6 +183,24 @@ class BaseExecutor(object):
...
@@ -183,6 +183,24 @@ class BaseExecutor(object):
self
.
errors
+=
self
.
algorithm
.
errors
self
.
errors
+=
self
.
algorithm
.
errors
return
return
# Check that the mapping in coherent
if
len
(
self
.
data
[
'
inputs
'
])
!=
len
(
self
.
algorithm
.
input_map
):
self
.
errors
.
append
(
"
The number of inputs of the algorithm doesn
'
t correspond
"
)
if
len
(
self
.
data
[
'
outputs
'
])
!=
len
(
self
.
algorithm
.
output_map
):
self
.
errors
.
append
(
"
The number of outputs of the algorithm doesn
'
t correspond
"
)
for
name
in
self
.
data
[
'
inputs
'
].
keys
():
if
name
not
in
self
.
algorithm
.
input_map
.
keys
():
self
.
errors
.
append
(
"
The input
'
%s
'
doesn
'
t exist in the algorithm
"
%
name
)
for
name
in
self
.
data
[
'
outputs
'
].
keys
():
if
name
not
in
self
.
algorithm
.
output_map
.
keys
():
self
.
errors
.
append
(
"
The output
'
%s
'
doesn
'
t exist in the algorithm
"
%
name
)
if
self
.
errors
:
return
# Load the databases (if any is required)
# Load the databases (if any is required)
for
name
,
details
in
self
.
data
[
'
inputs
'
].
items
():
for
name
,
details
in
self
.
data
[
'
inputs
'
].
items
():
if
'
database
'
in
details
:
if
'
database
'
in
details
:
...
...
This diff is collapsed.
Click to expand it.
Philip ABBET
@pabbet
mentioned in commit
51e1ee41
·
7 years ago
mentioned in commit
51e1ee41
mentioned in commit 51e1ee41d64247215df39d07739ec29af232eb3a
Toggle commit list
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