W&B dict copy to fix change bug (#12779)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
06ff89b404
commit
e26036d965
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ def _plot_curve(
|
||||||
|
|
||||||
def _log_plots(plots, step):
|
def _log_plots(plots, step):
|
||||||
"""Logs plots from the input dictionary if they haven't been logged already at the specified step."""
|
"""Logs plots from the input dictionary if they haven't been logged already at the specified step."""
|
||||||
for name, params in plots.items():
|
for name, params in plots.copy().items(): # shallow copy to prevent plots dict changing during iteration
|
||||||
timestamp = params["timestamp"]
|
timestamp = params["timestamp"]
|
||||||
if _processed_plots.get(name) != timestamp:
|
if _processed_plots.get(name) != timestamp:
|
||||||
wb.run.log({name.stem: wb.Image(str(name))}, step=step)
|
wb.run.log({name.stem: wb.Image(str(name))}, step=step)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue