mirror of
https://github.com/wassname/ray.git
synced 2026-08-17 11:25:34 +08:00
Reduce Ray / RLlib startup messages (#5368)
This commit is contained in:
@@ -142,10 +142,6 @@ def validate_config(config):
|
||||
logger.warning(
|
||||
"Using the simple non-minibatch optimizer. This will greatly "
|
||||
"reduce performance, consider simple_optimizer=False.")
|
||||
if not config["vf_share_layers"]:
|
||||
logger.warning(
|
||||
"FYI: By default, the value function will not share layers "
|
||||
"with the policy model ('vf_share_layers': False).")
|
||||
|
||||
|
||||
PPOTrainer = build_trainer(
|
||||
|
||||
@@ -317,9 +317,9 @@ class RolloutWorker(EvaluatorInterface):
|
||||
if (ray.is_initialized()
|
||||
and ray.worker._mode() != ray.worker.LOCAL_MODE
|
||||
and not ray.get_gpu_ids()):
|
||||
logger.info("Creating policy evaluation worker {}".format(
|
||||
logger.debug("Creating policy evaluation worker {}".format(
|
||||
worker_index) +
|
||||
" on CPU (please ignore any CUDA init errors)")
|
||||
" on CPU (please ignore any CUDA init errors)")
|
||||
if not tf:
|
||||
raise ImportError("Could not import tensorflow")
|
||||
with tf.Graph().as_default():
|
||||
|
||||
@@ -321,7 +321,7 @@ class DynamicTFPolicy(TFPolicy):
|
||||
batch_tensors[k] = placeholder
|
||||
|
||||
if log_once("loss_init"):
|
||||
logger.info(
|
||||
logger.debug(
|
||||
"Initializing loss function with dummy input:\n\n{}\n".format(
|
||||
summarize(batch_tensors)))
|
||||
|
||||
|
||||
@@ -65,7 +65,10 @@ def try_import_tf():
|
||||
return None
|
||||
|
||||
try:
|
||||
if "TF_CPP_MIN_LOG_LEVEL" not in os.environ:
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
||||
import tensorflow.compat.v1 as tf
|
||||
tf.logging.set_verbosity(tf.logging.ERROR)
|
||||
tf.disable_v2_behavior()
|
||||
return tf
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user