Move profiling code to a new file and fix thread safety (#2397)

This commit is contained in:
Hao Chen
2018-07-16 09:09:52 +08:00
committed by Robert Nishihara
parent bbea73155a
commit 8a3e180156
4 changed files with 301 additions and 258 deletions
+6 -7
View File
@@ -47,9 +47,9 @@ except ImportError as e:
raise
from ray.local_scheduler import ObjectID, _config # noqa: E402
from ray.profiling import profile # noqa: E402
from ray.worker import (error_info, init, connect, disconnect, get, put, wait,
remote, profile, flush_profile_data, get_gpu_ids,
get_resource_ids, get_webui_url,
remote, get_gpu_ids, get_resource_ids, get_webui_url,
register_custom_serializer, shutdown) # noqa: E402
from ray.worker import (SCRIPT_MODE, WORKER_MODE, LOCAL_MODE,
SILENT_MODE) # noqa: E402
@@ -65,11 +65,10 @@ __version__ = "0.5.0"
__all__ = [
"error_info", "init", "connect", "disconnect", "get", "put", "wait",
"remote", "profile", "flush_profile_data", "actor", "method",
"get_gpu_ids", "get_resource_ids", "get_webui_url",
"register_custom_serializer", "shutdown", "SCRIPT_MODE", "WORKER_MODE",
"LOCAL_MODE", "SILENT_MODE", "global_state", "ObjectID", "_config",
"__version__"
"remote", "profile", "actor", "method", "get_gpu_ids", "get_resource_ids",
"get_webui_url", "register_custom_serializer", "shutdown", "SCRIPT_MODE",
"WORKER_MODE", "LOCAL_MODE", "SILENT_MODE", "global_state", "ObjectID",
"_config", "__version__"
]
import ctypes # noqa: E402