Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
17261566
Commit
17261566
authored
Nov 16, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't warn too much about deprecation
parent
b325e257
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tensorpack/predict/base.py
tensorpack/predict/base.py
+6
-4
No files found.
tensorpack/predict/base.py
View file @
17261566
...
...
@@ -12,6 +12,7 @@ from ..tfutils.tower import TowerContext
from
..input_source
import
PlaceholderInput
from
..utils.develop
import
log_deprecated
from
..utils.argtools
import
log_once
from
..utils.utils
import
execute_only_once
__all__
=
[
'PredictorBase'
,
'AsyncPredictorBase'
,
'OnlinePredictor'
,
'OfflinePredictor'
,
...
...
@@ -41,10 +42,11 @@ class PredictorBase(object):
"""
if
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
(
list
,
tuple
)):
dp
=
args
[
0
]
# backward-compatibility
log_deprecated
(
"Calling a predictor with one datapoint"
,
"Call it with positional arguments instead!"
,
"2018-3-1"
)
if
execute_only_once
():
log_deprecated
(
"Calling a predictor with one datapoint"
,
"Call it with positional arguments instead!"
,
"2018-3-1"
)
else
:
dp
=
args
output
=
self
.
_do_call
(
dp
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment