Skip to content

Commit 99e06f4

Browse files
authored
Update hyperparameter_tuning_tutorial.py
1 parent b9c3e82 commit 99e06f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

beginner_source/hyperparameter_tuning_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from ray.air import Checkpoint, session
5353
from ray.tune.schedulers import ASHAScheduler
5454

55-
# FIXME: migrate to ray.train.Checkpoint and remove following line
55+
# TODO: Migrate to ray.train.Checkpoint and remove following line
5656
os.environ["RAY_AIR_NEW_PERSISTENCE_MODE"]="0"
5757

5858
######################################################################
@@ -455,8 +455,8 @@ def main(num_samples=10, max_num_epochs=10, gpus_per_trial=2):
455455
# Fixes ``AttributeError: '_LoggingTee' object has no attribute 'fileno'``.
456456
# This is only needed to run with sphinx-build.
457457
import sys
458-
459-
sys.stdout.fileno = lambda: False
458+
if not not hasattr(sys.stdout, "encoding"):
459+
sys.stdout.encoding = "latin1"
460460
# sphinx_gallery_end_ignore
461461
# You can change the number of GPUs per trial here:
462462
main(num_samples=10, max_num_epochs=10, gpus_per_trial=0)

0 commit comments

Comments
 (0)