Newbie question : how to debug map_batches

How severe does this issue affect your experience of using Ray?

  • Low: It annoys or frustrates me for a moment.

I’m just starting to learn ray.

Following my code:

import ray
ray.init()

def print_batch_1(batch):
print(“Hello”)
print(dir(batch))
print(batch[“jpg”])

import ray.data
ds = ray.data.read_webdataset(“./cifar10_test.tar”)

z = ds.map_batches(print_batch_1)

My question is , how and where do I see prints of the logs from print_batch_1() ?

In general how should I set up debugger if I want to set up a breakpoint in the map_batches function?

Never mind folks :slight_smile:
Realized that ray does lazy evalulations , so won’t get any prints unless I iterate over the dataset.

1 Like