diff --git a/python/ray/autoscaler/_private/commands.py b/python/ray/autoscaler/_private/commands.py index c70fdf33e..922c2332b 100644 --- a/python/ray/autoscaler/_private/commands.py +++ b/python/ray/autoscaler/_private/commands.py @@ -270,8 +270,15 @@ def _bootstrap_config(config: Dict[str, Any], cli_logger.print("Checking {} environment settings", _PROVIDER_PRETTY_NAMES.get(config["provider"]["type"])) - - config = provider_cls.fillout_available_node_types_resources(config) + try: + config = provider_cls.fillout_available_node_types_resources(config) + except Exception as exc: + if cli_logger.verbosity > 2: + logger.exception("Failed to autodetect node resources.") + else: + cli_logger.warning( + f"Failed to autodetect node resources: {str(exc)}. " + "You can see full stack trace with higher verbosity.") # NOTE: if `resources` field is missing, validate_config for non-AWS will # fail (the schema error will ask the user to manually fill the resources)