Remove deprecated global state. (#6655)

This commit is contained in:
Robert Nishihara
2019-12-31 22:40:47 -08:00
committed by GitHub
parent 4150d444a1
commit 9baa002069
2 changed files with 2 additions and 60 deletions
-57
View File
@@ -1069,66 +1069,9 @@ class GlobalState(object):
}
class DeprecatedGlobalState(object):
"""A class used to print errors when the old global state API is used."""
def object_table(self, object_id=None):
raise DeprecationWarning(
"ray.global_state.object_table() is deprecated. Use ray.objects() "
"instead.")
def task_table(self, task_id=None):
raise DeprecationWarning(
"ray.global_state.task_table() is deprecated. Use ray.tasks() "
"instead.")
def function_table(self, function_id=None):
raise DeprecationWarning(
"ray.global_state.function_table() is deprecated.")
def client_table(self):
raise DeprecationWarning(
"ray.global_state.client_table() is deprecated. Use ray.nodes() "
"instead.")
def profile_table(self):
raise DeprecationWarning(
"ray.global_state.profile_table() is deprecated.")
def chrome_tracing_dump(self, filename=None):
raise DeprecationWarning(
"ray.global_state.chrome_tracing_dump() is deprecated. Use "
"ray.timeline() instead.")
def chrome_tracing_object_transfer_dump(self, filename=None):
raise DeprecationWarning(
"ray.global_state.chrome_tracing_object_transfer_dump() is "
"deprecated. Use ray.object_transfer_timeline() instead.")
def workers(self):
raise DeprecationWarning("ray.global_state.workers() is deprecated.")
def cluster_resources(self):
raise DeprecationWarning(
"ray.global_state.cluster_resources() is deprecated. Use "
"ray.cluster_resources() instead.")
def available_resources(self):
raise DeprecationWarning(
"ray.global_state.available_resources() is deprecated. Use "
"ray.available_resources() instead.")
def error_messages(self, all_jobs=False):
raise DeprecationWarning(
"ray.global_state.error_messages() is deprecated. Use "
"ray.errors() instead.")
state = GlobalState()
"""A global object used to access the cluster's global state."""
global_state = DeprecatedGlobalState()
def jobs():
"""Get a list of the jobs in the cluster.