When running scripts/checkpoint_to_huggingface.py without specifying wandb_ids list it trips up on LN55 with TypeError: 'NoneType' object is not subscriptable, because this block that collects wnadb_ids from directory name if wandb_id isn't specified is never entered, as it checks for emptiness via wandb_ids == [], and the default is wandb_ids: Optional[list[str]] = None.
Expected behavior
When wandb_ids is not specified should get it from callback directory path
Describe the bug
When running
scripts/checkpoint_to_huggingface.py
without specifying wandb_ids list it trips up on LN55 withTypeError: 'NoneType' object is not subscriptable
, because this block that collects wnadb_ids from directory name if wandb_id isn't specified is never entered, as it checks for emptiness viawandb_ids == []
, and the default iswandb_ids: Optional[list[str]] = None
.Expected behavior
When wandb_ids is not specified should get it from callback directory path
Suggested fix
change default value to empty list solves it:
wandb_ids: Optional[list[str]] = []