Skip to content

Commit

Permalink
feat: deprecate deepaas-predict
Browse files Browse the repository at this point in the history
Functionality relies on a method predict_data() that was deprecated long
ago. deepaas-cli already supports that functionality.

Fixes #154
  • Loading branch information
alvarolopez committed Jun 7, 2024
1 parent 81066ba commit b7af423
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deepaas/cmd/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import shutil
import sys
import warnings

from oslo_config import cfg
from oslo_log import log
Expand Down Expand Up @@ -111,6 +112,14 @@ def prediction(input_file, file_type, content_type):


def main():
msg = (
"\033[0;31;40mWARNING: This command is deprectated, please use "
"deepaas-cli instead. \n"
"WARNING: This command will be removed in the next major release. \033[0m"
)
warnings.warn(msg, DeprecationWarning, stacklevel=2)
sys.stderr.write(msg + "\n")

cfg.CONF(sys.argv[1:])
input_file = CONF.input_file
content_type = CONF.content_type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
deprecations:
- |
The command ``deepaas-predict`` is now deprecated, please use ``deepaas-cli`` instead.

0 comments on commit b7af423

Please sign in to comment.