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))
Description
In the file
task_singular_vectors/src/utils/tallmask_utils.py, inside the function:the code attempts to save the selected TALL masks with:
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:
os.makedirs(..., exist_ok=True))