Skip to content

# 🐛 Bug: Missing directory creation when saving TALL masks #6

@nehdiii

Description

@nehdiii

Description

In the file
task_singular_vectors/src/utils/tallmask_utils.py, inside the function:

def find_optimal_mask(val_metrics, eval_masks, args, save_masks=True):

the code attempts to save the selected TALL masks with:

np.save(os.path.join(mask_save_dir, args.model, mask_name), best_masks_for_test_vector)

However, the required directory (models/tall_masks/ViT-B-32) may not exist.
This raises an error at the end of the best-coefficient search, preventing the masks from being saved.
As a result, Consensus TA training fails later because the masks are missing.


Expected Behavior

The code should ensure that the target save path exists before calling np.save.
Either:

  • Automatically create the path (using os.makedirs(..., exist_ok=True))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions