Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ A script to score CSV files via DataRobot's prediction API.
.. image:: https://badge.fury.io/py/datarobot-batch-scoring.svg
:target: https://badge.fury.io/py/datarobot-batch-scoring

Deprecation Notice
=======================
The Batch Scoring script is deprecated. It will continue functioning indefinitely,
but it will not receive any new bug fixes and new functionality.
Please, use the [Batch Prediction command-line tools](https://app.datarobot.com/docs/predictions/batch/cli-scripts.html] instead.

Version Compatibility
---------------------
Expand Down
16 changes: 16 additions & 0 deletions datarobot_batch_scoring/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@

REPORT_INTERVAL = 5

DEPRECATION_WARNING = (
'{yellow}{bold}Deprecation Warning!{reset} '
'The Batch Scoring script is deprecated. It will continue functioning '
'indefinitely, but it will not receive any new bug fixes and new '
'functionality. Please, use the Batch Prediction command-line tools '
'instead: '
'({underline}https://app.datarobot.com/docs/predictions'
'/batch/cli-scripts.html{reset}).'
.format(
yellow='\033[93m',
bold='\033[1m',
reset='\033[0m',
underline='\033[4m'
)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍



class WriterQueueMsg(object):
CTX_WARNING = 'CTX_WARNING'
Expand Down
5 changes: 4 additions & 1 deletion datarobot_batch_scoring/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from datarobot_batch_scoring.api_response_handlers import (
RESPONSE_HANDLERS, PRED_API_V10, API_V1)
from datarobot_batch_scoring.batch_scoring import (run_batch_predictions)
from datarobot_batch_scoring.consts import DEPRECATION_WARNING
from datarobot_batch_scoring.exceptions import ShelveError
from datarobot_batch_scoring.utils import (UI, get_config_file,
parse_config_file,
Expand Down Expand Up @@ -38,7 +39,8 @@
$ batch_scoring --host https://example.orm.datarobot.com \
--user="<username>" --password="<password>" 5545eb20b4912911244d4835 \
5545eb71b4912911244d4847 ~/Downloads/diabetes_test.csv
"""
{deprecation_warning}
""".format(deprecation_warning=DEPRECATION_WARNING)


VALID_DELIMITERS = {';', ',', '|', '\t', ' ', '!', ' '}
Expand Down Expand Up @@ -519,5 +521,6 @@ def main_standalone(argv=sys.argv[1:]):


if __name__ == '__main__':
print(DEPRECATION_WARNING)
exit_code = main() # pragma: no cover
sys.exit(exit_code)
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import re
from setuptools import setup, find_packages

from datarobot_batch_scoring.consts import DEPRECATION_WARNING

extra = {}

def read_requirements_file(file):
Expand Down Expand Up @@ -83,3 +85,5 @@ def read_requirements_file(file):
],
**extra
)

print(DEPRECATION_WARNING)