[minor] fix up docs (#11596)

Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
Richard Liaw
2020-10-26 12:19:03 -07:00
committed by GitHub
parent 2da6ad2176
commit b02e61f672
+1 -1
View File
@@ -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}))