mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:06:31 +08:00
[tune] Avoid crash in client mode when return results creating logdir (#14115)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import Callable, Dict, Sequence, Union
|
||||
import json
|
||||
|
||||
import ray
|
||||
import ray.cloudpickle as cloudpickle
|
||||
from collections import deque
|
||||
import copy
|
||||
@@ -640,4 +641,9 @@ class Trial:
|
||||
|
||||
self.__dict__.update(state)
|
||||
validate_trainable(self.trainable_name)
|
||||
self.init_logdir() # Create logdir if it does not exist
|
||||
|
||||
# Avoid creating logdir in client mode for returned trial results,
|
||||
# since the dir might not be creatable locally. TODO(ekl) thsi is kind
|
||||
# of a hack.
|
||||
if not ray.util.client.ray.is_connected():
|
||||
self.init_logdir() # Create logdir if it does not exist
|
||||
|
||||
Reference in New Issue
Block a user