ray-tune

How do I make ray.tune.run reproducible?

无人久伴 提交于 2021-01-29 07:40:10
问题 I'm using Tune class-based Trainable API. See code sample: from ray import tune import numpy as np np.random.seed(42) # first run tune.run(tune.Trainable, ...) # second run, expecting same result np.random.seed(42) tune.run(tune.Trainable, ...) The problem is that tune.run results are still different, likely reason being that each ray actor still has different seed. Question : how do I make ray.tune.run reproducible? 回答1: (This answer focuses on class API and ray version 0.8.7. Function API

How do I make ray.tune.run reproducible?

妖精的绣舞 提交于 2021-01-29 07:36:28
问题 I'm using Tune class-based Trainable API. See code sample: from ray import tune import numpy as np np.random.seed(42) # first run tune.run(tune.Trainable, ...) # second run, expecting same result np.random.seed(42) tune.run(tune.Trainable, ...) The problem is that tune.run results are still different, likely reason being that each ray actor still has different seed. Question : how do I make ray.tune.run reproducible? 回答1: (This answer focuses on class API and ray version 0.8.7. Function API

Obtaining different set of configs across multiple calls in ray tune

可紊 提交于 2021-01-28 07:55:29
问题 I am trying to make my code reproducible. I have already added np.random.seed(...) and random.seed(...), and at the moment I am not using pytorch or tf, therefore no scheduler or searcher can introduce any random issue. The set of configs produced with the above code should be always the same across multiple calls. However, it is not the case. Can anyone help with this? Thank you! Here the code: import ray from ray import tune import random import numpy as np def training_function(config,