mypy wandb ignore (#572)

* mypy wandb ignore

* fix isort for wandb
This commit is contained in:
Wing Lian
2023-09-14 11:17:30 -04:00
committed by GitHub
parent 115795079d
commit c6d870b91d

View File

@@ -385,7 +385,7 @@ def log_prediction_callback_factory(trainer: Trainer, tokenizer):
return ranges return ranges
def log_table_from_dataloader(name: str, table_dataloader): def log_table_from_dataloader(name: str, table_dataloader):
table = wandb.Table( table = wandb.Table( # type: ignore[attr-defined]
columns=[ columns=[
"id", "id",
"Prompt", "Prompt",
@@ -506,7 +506,7 @@ def log_prediction_callback_factory(trainer: Trainer, tokenizer):
) )
row_index += 1 row_index += 1
wandb.run.log({f"{name} - Predictions vs Ground Truth": table}) wandb.run.log({f"{name} - Predictions vs Ground Truth": table}) # type: ignore[attr-defined]
if is_main_process(): if is_main_process():
log_table_from_dataloader("Eval", eval_dataloader) log_table_from_dataloader("Eval", eval_dataloader)