mirror of
https://github.com/wassname/ray.git
synced 2026-07-11 02:29:16 +08:00
[tune][minor] gpu warning (#5948)
* gpu * formaat * defaults * format_and_check * better registration * fix * fix * trial * foramt * tune
This commit is contained in:
@@ -93,7 +93,7 @@ class RayTrialExecutor(TrialExecutor):
|
||||
memory=trial.resources.memory,
|
||||
object_store_memory=trial.resources.object_store_memory,
|
||||
resources=trial.resources.custom_resources)(
|
||||
trial._get_trainable_cls())
|
||||
trial.get_trainable_cls())
|
||||
|
||||
trial.init_logger()
|
||||
# We checkpoint metadata here to try mitigating logdir duplication
|
||||
@@ -622,6 +622,11 @@ class RayTrialExecutor(TrialExecutor):
|
||||
trial.runner.export_model.remote(trial.export_formats))
|
||||
return {}
|
||||
|
||||
def has_gpus(self):
|
||||
if self._resources_initialized:
|
||||
self._update_avail_resources()
|
||||
return self._avail_resources.gpu > 0
|
||||
|
||||
|
||||
def _to_gb(n_bytes):
|
||||
return round(n_bytes / (1024**3), 2)
|
||||
|
||||
Reference in New Issue
Block a user