mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 23:08:32 +08:00
Only install ray python packages. (#330)
* Only install ray python packages. * Add some __init__.py files. * Install Ray before building documentation. * Fix install-ray.sh. * Fix.
This commit is contained in:
committed by
Philipp Moritz
parent
39b7abefc5
commit
6a4bde54dc
+1
-1
@@ -6,10 +6,10 @@ import hashlib
|
||||
import inspect
|
||||
import json
|
||||
import numpy as np
|
||||
import local_scheduler
|
||||
import random
|
||||
import traceback
|
||||
|
||||
import ray.local_scheduler as local_scheduler
|
||||
import ray.pickling as pickling
|
||||
import ray.worker
|
||||
import ray.experimental.state as state
|
||||
|
||||
@@ -11,15 +11,6 @@ import unittest
|
||||
import redis
|
||||
import ray.services
|
||||
|
||||
# Check if the redis-server binary is present.
|
||||
redis_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "../../core/src/common/thirdparty/redis/src/redis-server")
|
||||
if not os.path.exists(redis_path):
|
||||
raise Exception("You do not have the redis-server binary. Run `make test` in the plasma directory to get it.")
|
||||
|
||||
# Absolute path of the ray redis module.
|
||||
module_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "../../core/src/common/redis_module/libray_redis_module.so")
|
||||
print("path to the redis module is {}".format(module_path))
|
||||
|
||||
OBJECT_INFO_PREFIX = "OI:"
|
||||
OBJECT_LOCATION_PREFIX = "OL:"
|
||||
OBJECT_SUBSCRIBE_PREFIX = "OS:"
|
||||
@@ -7,7 +7,7 @@ import pickle
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import local_scheduler
|
||||
import ray.local_scheduler as local_scheduler
|
||||
|
||||
ID_SIZE = 20
|
||||
|
||||
Vendored
@@ -13,10 +13,10 @@ import threading
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import global_scheduler
|
||||
import local_scheduler
|
||||
import plasma
|
||||
from plasma.utils import random_object_id, generate_metadata, write_to_data_buffer, create_object_with_id, create_object
|
||||
import ray.global_scheduler as global_scheduler
|
||||
import ray.local_scheduler as local_scheduler
|
||||
import ray.plasma as plasma
|
||||
from ray.plasma.utils import random_object_id, generate_metadata, write_to_data_buffer, create_object_with_id, create_object
|
||||
|
||||
from ray import services
|
||||
|
||||
@@ -2,5 +2,5 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from core.src.local_scheduler.liblocal_scheduler_library import *
|
||||
from ray.core.src.local_scheduler.liblocal_scheduler_library import *
|
||||
from .local_scheduler_services import *
|
||||
@@ -12,8 +12,8 @@ import threading
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import local_scheduler
|
||||
import plasma
|
||||
import ray.local_scheduler as local_scheduler
|
||||
import ray.plasma as plasma
|
||||
|
||||
USE_VALGRIND = False
|
||||
ID_SIZE = 20
|
||||
@@ -11,7 +11,7 @@ If you are using Anaconda, try fixing this problem by running:
|
||||
"""
|
||||
|
||||
try:
|
||||
from core.src.numbuf.libnumbuf import *
|
||||
from ray.core.src.numbuf.libnumbuf import *
|
||||
except ImportError as e:
|
||||
if hasattr(e, "msg") and isinstance(e.msg, str) and ("libstdc++" in e.msg or "CXX" in e.msg):
|
||||
# This code path should be taken with Python 3.
|
||||
@@ -2,4 +2,4 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from plasma.plasma import *
|
||||
from ray.plasma.plasma import *
|
||||
@@ -8,9 +8,9 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import core.src.plasma.libplasma as libplasma
|
||||
from core.src.plasma.libplasma import plasma_object_exists_error
|
||||
from core.src.plasma.libplasma import plasma_out_of_memory_error
|
||||
import ray.core.src.plasma.libplasma as libplasma
|
||||
from ray.core.src.plasma.libplasma import plasma_object_exists_error
|
||||
from ray.core.src.plasma.libplasma import plasma_out_of_memory_error
|
||||
|
||||
PLASMA_ID_SIZE = 20
|
||||
PLASMA_WAIT_TIMEOUT = 2 ** 30
|
||||
@@ -15,8 +15,8 @@ import threading
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import plasma
|
||||
from plasma.utils import random_object_id, generate_metadata, write_to_data_buffer, create_object_with_id, create_object
|
||||
import ray.plasma as plasma
|
||||
from ray.plasma.utils import random_object_id, generate_metadata, write_to_data_buffer, create_object_with_id, create_object
|
||||
from ray import services
|
||||
|
||||
USE_VALGRIND = False
|
||||
@@ -3,8 +3,8 @@ from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
import numbuf
|
||||
|
||||
import ray.numbuf as numbuf
|
||||
import ray.pickling as pickling
|
||||
|
||||
def check_serializable(cls):
|
||||
|
||||
@@ -17,9 +17,9 @@ import time
|
||||
import threading
|
||||
|
||||
# Ray modules
|
||||
import local_scheduler
|
||||
import plasma
|
||||
import global_scheduler
|
||||
import ray.local_scheduler as local_scheduler
|
||||
import ray.plasma as plasma
|
||||
import ray.global_scheduler as global_scheduler
|
||||
|
||||
PROCESS_TYPE_WORKER = "worker"
|
||||
PROCESS_TYPE_LOCAL_SCHEDULER = "local_scheduler"
|
||||
@@ -217,8 +217,8 @@ def start_redis(port=None, num_retries=20, stdout_file=None, stderr_file=None,
|
||||
Raises:
|
||||
Exception: An exception is raised if Redis could not be started.
|
||||
"""
|
||||
redis_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../core/src/common/thirdparty/redis/src/redis-server")
|
||||
redis_module = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../core/src/common/redis_module/libray_redis_module.so")
|
||||
redis_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "./core/src/common/thirdparty/redis/src/redis-server")
|
||||
redis_module = os.path.join(os.path.dirname(os.path.abspath(__file__)), "./core/src/common/redis_module/libray_redis_module.so")
|
||||
assert os.path.isfile(redis_filepath)
|
||||
assert os.path.isfile(redis_module)
|
||||
counter = 0
|
||||
|
||||
@@ -25,9 +25,9 @@ import traceback
|
||||
import ray.pickling as pickling
|
||||
import ray.serialization as serialization
|
||||
import ray.services as services
|
||||
import numbuf
|
||||
import local_scheduler
|
||||
import plasma
|
||||
import ray.numbuf as numbuf
|
||||
import ray.local_scheduler as local_scheduler
|
||||
import ray.plasma as plasma
|
||||
|
||||
SCRIPT_MODE = 0
|
||||
WORKER_MODE = 1
|
||||
|
||||
@@ -37,7 +37,7 @@ if __name__ == "__main__":
|
||||
error_explanation = """
|
||||
This error is unexpected and should not have happened. Somehow a worker crashed
|
||||
in an unanticipated way causing the main_loop to throw an exception, which is
|
||||
being caught in "lib/python/ray/workers/default_worker.py".
|
||||
being caught in "python/ray/workers/default_worker.py".
|
||||
"""
|
||||
|
||||
while True:
|
||||
|
||||
+10
-10
@@ -19,16 +19,16 @@ class install(_install.install):
|
||||
setup(name="ray",
|
||||
version="0.0.1",
|
||||
packages=find_packages(),
|
||||
package_data={"core": ["src/common/thirdparty/redis/src/redis-server",
|
||||
"src/common/redis_module/libray_redis_module.so",
|
||||
"src/plasma/plasma_store",
|
||||
"src/plasma/plasma_manager",
|
||||
"src/plasma/libplasma.so",
|
||||
"src/local_scheduler/local_scheduler",
|
||||
"src/local_scheduler/liblocal_scheduler_library.so",
|
||||
"src/numbuf/libarrow.so",
|
||||
"src/numbuf/libnumbuf.so",
|
||||
"src/global_scheduler/global_scheduler"]},
|
||||
package_data={"ray": ["core/src/common/thirdparty/redis/src/redis-server",
|
||||
"core/src/common/redis_module/libray_redis_module.so",
|
||||
"core/src/plasma/plasma_store",
|
||||
"core/src/plasma/plasma_manager",
|
||||
"core/src/plasma/libplasma.so",
|
||||
"core/src/local_scheduler/local_scheduler",
|
||||
"core/src/local_scheduler/liblocal_scheduler_library.so",
|
||||
"core/src/numbuf/libarrow.so",
|
||||
"core/src/numbuf/libnumbuf.so",
|
||||
"core/src/global_scheduler/global_scheduler"]},
|
||||
cmdclass={"install": install},
|
||||
install_requires=["numpy",
|
||||
"funcsigs",
|
||||
|
||||
Reference in New Issue
Block a user