[core] Move log_to_driver back to public (#10422)

This commit is contained in:
Richard Liaw
2020-08-29 16:35:14 -07:00
committed by GitHub
parent 9a31166050
commit cb438be146
7 changed files with 11 additions and 11 deletions
@@ -77,7 +77,7 @@ async def trial(actors, session, data_size):
async def main():
ray.init(_log_to_driver=False)
ray.init(log_to_driver=False)
serve.init()
serve.create_backend("backend", backend)
+2 -2
View File
@@ -208,7 +208,7 @@ class CaptureOutputAndError:
def test_logging_to_driver(shutdown_only):
ray.init(num_cpus=1, _log_to_driver=True)
ray.init(num_cpus=1, log_to_driver=True)
@ray.remote
def f():
@@ -233,7 +233,7 @@ def test_logging_to_driver(shutdown_only):
def test_not_logging_to_driver(shutdown_only):
ray.init(num_cpus=1, _log_to_driver=False)
ray.init(num_cpus=1, log_to_driver=False)
@ray.remote
def f():
@@ -106,7 +106,7 @@ def tune_transformer(num_samples=8,
gpus_per_trial=0,
smoke_test=False,
ray_address=None):
ray.init(ray_address, _log_to_driver=False)
ray.init(ray_address, log_to_driver=False)
data_dir_name = "./data" if not smoke_test else "./test_data"
data_dir = os.path.abspath(os.path.join(os.getcwd(), data_dir_name))
if not os.path.exists(data_dir):
+1 -1
View File
@@ -31,7 +31,7 @@ class Capturing:
@pytest.fixture
def start_ray():
ray.init(_log_to_driver=False, local_mode=True)
ray.init(log_to_driver=False, local_mode=True)
_register_all()
yield
ray.shutdown()
@@ -102,7 +102,7 @@ if __name__ == "__main__":
args, _ = parser.parse_known_args()
num_cpus = 4 if args.smoke_test else None
ray.init(address=args.address, num_cpus=num_cpus, _log_to_driver=True)
ray.init(address=args.address, num_cpus=num_cpus, log_to_driver=True)
trainer1 = TorchTrainer(
model_creator=ResNet18,
@@ -98,7 +98,7 @@ if __name__ == "__main__":
"--tune", action="store_true", default=False, help="Tune training")
args, _ = parser.parse_known_args()
ray.init(address=args.address, _log_to_driver=True)
ray.init(address=args.address, log_to_driver=True)
TorchTrainable = TorchTrainer.as_trainable(
model_creator=ResNet18,
+4 -4
View File
@@ -483,12 +483,12 @@ def init(
configure_logging=True,
logging_level=logging.INFO,
logging_format=ray_constants.LOGGER_FORMAT,
log_to_driver=True,
enable_object_reconstruction=False,
# The following are unstable parameters and their use is discouraged.
_redis_max_memory=None,
_node_ip_address=ray_constants.NODE_DEFAULT_IP,
_driver_object_store_memory=None,
_log_to_driver=True,
_memory=None,
_redis_password=ray_constants.REDIS_DEFAULT_PASSWORD,
_include_java=False,
@@ -564,6 +564,8 @@ def init(
timestamp, filename, line number, and message. See the source file
ray_constants.py for details. Ignored unless "configure_logging"
is true.
log_to_driver (bool): If true, the output from all of the worker
processes on all nodes will be directed to the driver.
enable_object_reconstruction (bool): If True, when an object stored in
the distributed plasma store is lost due to node failure, Ray will
attempt to reconstruct the object by re-executing the task that
@@ -574,8 +576,6 @@ def init(
_node_ip_address (str): The IP address of the node that we are on.
_driver_object_store_memory (int): Limit the amount of memory the
driver can use in the object store for creating objects.
_log_to_driver (bool): If true, the output from all of the worker
processes on all nodes will be directed to the driver.
_memory: Amount of reservable memory resource to create.
_redis_password (str): Prevents external clients without the password
from connecting to Redis if provided.
@@ -739,7 +739,7 @@ def init(
connect(
_global_node,
mode=driver_mode,
log_to_driver=_log_to_driver,
log_to_driver=log_to_driver,
worker=global_worker,
driver_object_store_memory=_driver_object_store_memory,
job_id=None,