[rllib] [RFC] Deprecate Python 2 / RLlib (#4832)

This commit is contained in:
Eric Liang 2019-05-25 10:45:26 -07:00 committed by Richard Liaw
parent 0ce0ecbe9c
commit 7237ea70c4

View file

@ -3,6 +3,7 @@ from __future__ import division
from __future__ import print_function
import logging
import sys
# Note: do not introduce unnecessary library dependencies here, e.g. gym.
# This file is imported from the tune module in order to register RLlib agents.
@ -30,6 +31,11 @@ def _setup_logger():
logger.addHandler(handler)
logger.propagate = False
if sys.version_info[0] < 3:
logger.warn(
"RLlib Python 2 support is deprecated, and will be removed "
"in a future release.")
def _register_all():