mirror of
https://github.com/wassname/ray.git
synced 2026-07-14 11:17:54 +08:00
[minor] fix up docs (#11596)
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
@@ -115,7 +115,7 @@ Many Tune features rely on checkpointing, including the usage of certain Trial S
|
||||
for iter in range(start, 100):
|
||||
time.sleep(1)
|
||||
|
||||
with tune.checkpoint_dir(step=step):
|
||||
with tune.checkpoint_dir(step=step) as checkpoint_dir:
|
||||
path = os.path.join(checkpoint_dir, "checkpoint")
|
||||
with open(path, "w") as f:
|
||||
f.write(json.dumps({"step": start}))
|
||||
|
||||
Reference in New Issue
Block a user