Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.backend.python
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.backend.python
Commits
f1680a23
There was a problem fetching the pipeline summary.
Commit
f1680a23
authored
7 years ago
by
Samuel GAIST
Committed by
Samuel Gaist
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[executor] Log warning when using a legacy algorithm
parent
b0d2be8a
Branches
Branches containing commit
No related tags found
2 merge requests
!17
Merge development branch 1.5.x
,
!12
Legacy algorithm warning
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
beat/backend/python/executor.py
+3
-0
3 additions, 0 deletions
beat/backend/python/executor.py
beat/backend/python/test/test_executor.py
+10
-0
10 additions, 0 deletions
beat/backend/python/test/test_executor.py
with
13 additions
and
0 deletions
beat/backend/python/executor.py
+
3
−
0
View file @
f1680a23
...
@@ -164,6 +164,9 @@ class Executor(object):
...
@@ -164,6 +164,9 @@ class Executor(object):
return
False
return
False
else
:
else
:
if
self
.
algorithm
.
type
==
Algorithm
.
LEGACY
:
logger
.
warning
(
"
%s is using LEGACY I/O API, please upgrade this algorithm as soon as possible
"
%
self
.
algorithm
.
name
)
while
self
.
input_list
.
hasMoreData
():
while
self
.
input_list
.
hasMoreData
():
main_group
=
self
.
input_list
.
main_group
main_group
=
self
.
input_list
.
main_group
main_group
.
restricted_access
=
False
main_group
.
restricted_access
=
False
...
...
This diff is collapsed.
Click to expand it.
beat/backend/python/test/test_executor.py
+
10
−
0
View file @
f1680a23
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
import
unittest
import
unittest
import
logging
import
tempfile
import
tempfile
import
simplejson
import
simplejson
import
os
import
os
...
@@ -46,6 +47,7 @@ from ..helpers import convert_experiment_configuration_to_container
...
@@ -46,6 +47,7 @@ from ..helpers import convert_experiment_configuration_to_container
from
..helpers
import
AccessMode
from
..helpers
import
AccessMode
from
.
import
prefix
from
.
import
prefix
from
.mocks
import
MockLoggingHandler
CONFIGURATION
=
{
CONFIGURATION
=
{
...
@@ -164,8 +166,16 @@ class TestExecutor(unittest.TestCase):
...
@@ -164,8 +166,16 @@ class TestExecutor(unittest.TestCase):
def
test_legacy_echo_1
(
self
):
def
test_legacy_echo_1
(
self
):
log_handler
=
MockLoggingHandler
(
level
=
'
DEBUG
'
)
logging
.
getLogger
().
addHandler
(
log_handler
)
log_messages
=
log_handler
.
messages
self
.
process
(
'
legacy/echo/1
'
)
self
.
process
(
'
legacy/echo/1
'
)
info_len
=
len
(
log_messages
[
'
warning
'
])
self
.
assertEqual
(
info_len
,
1
)
self
.
assertEqual
(
log_messages
[
'
warning
'
][
info_len
-
1
],
'
legacy/echo/1 is using LEGACY I/O API, please upgrade this algorithm as soon as possible
'
)
def
test_sequential_echo_1
(
self
):
def
test_sequential_echo_1
(
self
):
self
.
process
(
'
sequential/echo/1
'
)
self
.
process
(
'
sequential/echo/1
'
)
...
...
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