@@ -1030,7 +1030,7 @@ async def log_samples(self, samples: Dict[str, List[dict]], step: int) -> None:
10301030 columns = list (table_rows [0 ].keys ())
10311031 table = wandb .Table (columns = columns , log_mode = "INCREMENTAL" )
10321032 self ._tables [table_name ] = table
1033- logger .info (
1033+ logger .debug (
10341034 f"WandbBackend: Created new incremental table: { table_name } "
10351035 )
10361036 else :
@@ -1042,10 +1042,10 @@ async def log_samples(self, samples: Dict[str, List[dict]], step: int) -> None:
10421042 table .add_data (* values )
10431043
10441044 # Log the same table object (INCREMENTAL update)
1045+ # table_name has to end with _table to be recognized by wandb
1046+ if not table_name .endswith ("_table" ):
1047+ table_name += "_table"
10451048 self .run .log ({f"{ table_name } " : table })
1046- logger .info (
1047- f"WandbBackend: Appended { len (table_rows )} rows to incremental table '{ table_name } ' at step { step } "
1048- )
10491049
10501050 def get_metadata_for_secondary_ranks (self ) -> dict [str , Any ]:
10511051 if self .run and self .per_rank_share_run :
@@ -1056,15 +1056,19 @@ async def finish(self) -> None:
10561056 import wandb
10571057
10581058 if self .run :
1059- # Convert each incremental table to immutable before finishing
1059+ """
1060+ Convert each incremental table to immutable before finishing
1061+ as recommended by wandb:
1062+ https://docs.wandb.ai/models/tables/log_tables#incremental-mode
1063+ """
10601064 for table_name , incr_table in self ._tables .items ():
10611065 final_table = wandb .Table (
10621066 columns = incr_table .columns ,
10631067 data = incr_table .data ,
10641068 log_mode = "IMMUTABLE" ,
10651069 )
10661070 self .run .log ({table_name : final_table })
1067- logger .info (f"WandbBackend: Finalized table { table_name } " )
1071+ logger .debug (f"WandbBackend: Finalized table { table_name } " )
10681072
10691073 self .run .finish ()
10701074 logger .info (f"WandbBackend { self .process_name } : Finished run" )
0 commit comments