Okay so in the end I've run it locally and it behaved as expected (no auto logging for matplotlib) but for trains agent it didn't work, it auto - logged it anyway. TimelyPenguin76
I think I know what happens TimelyPenguin76
Could it be that trains automatically logs these images to plots?
Because when I removed the report_media/report_image the images were still logged into plots
nope, this example use local path (for the PIL image)
Well the happy flow is to execute is locally, then clone this task and run it in the agent. If you dont want to run it locally, you can use the task.execute_remotely()
and clone this one or just start running it and kill it manually, or run one epoch to view the outputs
Well, I do exactly that but it still puts them under plots
Logger.current_logger().report_media(title=f"visualization images f{output_category}", series=output_path.split('.')[-2].split('/')[-1], iteration=1, local_path=output_path)
Was the agent task cloned from the one works as expected (the dev task)?
When you run it locally with auto_connect_frameworks={"matplotlib": False}
, did it send the matplotlib
outputs?
I use local path instead of providing the image as an object, does this change things?
No, the task it was cloned from was created with Task.create, but there is a Task.init in the file that is run by Task.create
Trains auto-magical reports many frameworks plots: matplotlib, Tensorboard and more, maybe this is the issue? The report_media / report_image
was double reporting?
Could it be because it's running from a draft on an agent?
If you like, you can disable the auto magical for matplotlib
and report manually.
For doing so, pass auto_connect_frameworks={"matplotlib": False}
to Task.init
.
I think so. The issue is that I want to report only a sub set of the images (for example I create an image for every sample in the dataset but I want to display on trains only the top 10 with highest score) but when it's magically logged I have no control over this. What can be done?
Hi SmarmySeaurchin8
I tried to reproduce your issue (run https://github.com/allegroai/trains/blob/master/examples/reporting/image_reporting.py example with many report_image
calls) and got all the outputs in the debug samples section, can you share a snippet or how can I reproduce this issue?
Can you send me the general flow in code?
BTW, if you want to clone a task, you can use Task.clone
Quite hard for me to check locally, could you check it using trans-agent?