Skip to content

Commit

Permalink
Try logging raylet.out
Browse files Browse the repository at this point in the history
  • Loading branch information
Uri Granta committed Jun 13, 2024
1 parent 511d393 commit 9711b12
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions docs/notebooks/asynchronous_nongreedy_batch_ray.pct.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# silence TF warnings and info messages, only print errors
# https://stackoverflow.com/questions/35911252/disable-tensorflow-debugging-information
import os
from pathlib import Path

from ray.exceptions import LocalRayletDiedError

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import tensorflow as tf
Expand Down Expand Up @@ -155,11 +158,16 @@ def launch_worker(x):

# we saw enough results to ask for a new batch

new_observations = [
observation
for worker in finished_workers
for observation in ray.get(worker)
]
try:
new_observations = [
observation
for worker in finished_workers
for observation in ray.get(worker)
]
except LocalRayletDiedError:
print("")
print("=======raylet.out=======")
print(Path("raylet.out").read_text())

# new_observations is a list of tuples (point, observation value)
# here we turn it into a Dataset and tell it to Trieste
Expand Down

0 comments on commit 9711b12

Please sign in to comment.