Skip to content

[ENH] Adience download with credentials - #155

Merged
franberchez merged 25 commits into
mainfrom
enh/adience-download
May 13, 2026
Merged

[ENH] Adience download with credentials#155
franberchez merged 25 commits into
mainfrom
enh/adience-download

Conversation

@victormvy

Copy link
Copy Markdown
Contributor

This PR introduces several improvements and refactors to the Adience dataset class, primarily focusing on download handling, API consistency, and test robustness.

1. Automatic dataset download

  • Added new parameters to __init__:
    • download
    • username
    • password
  • When download=True and valid credentials are provided, the dataset is automatically downloaded into the specified root directory.

2. Root directory behaviour update

  • The meaning of the root parameter has been updated:
    • Before: referred to a general datasets workspace directory.
    • Now: refers directly to the Adience dataset root directory, in line with torchvision.datasets.VisionDataset.
  • Backward compatibility has been partially preserved by checking for the existence of the legacy adience subdirectory.
  • ⚠️ The old behaviour will be removed in v3.0.0.

3. Warning for ranges modification

  • Added a warning when modifying the ranges parameter.
  • This change affects dataset composition and therefore produces a dataset that is not directly comparable to the standard Adience benchmark.

4. Test suite improvements

The test suite for the Adience dataset has been significantly expanded and refactored:

  • Added tests for download-related failures:
    • Invalid credentials
    • Corrupted files
    • Network errors
  • Added tests for malformed and edge-case age range inputs.
  • Added tests ensuring correct cache invalidation and regeneration when:
    • ranges changes
    • test_size changes
  • Refactored fixtures to improve readability and maintainability.

5. Test utilities refactor

  • Moved test-only helper functions (e.g. fake data generation, MD5 computation) into a dedicated module:
    • tests/utils/adience.py

victormvy added 3 commits May 10, 2026 11:29
…onfig hashing

- Replace filesystem-based partition logic with CSV-based train/test splits
- Introduce deterministic cache key based on ranges, test_size and version
- Persist split configuration in JSON alongside cached splits
- Remove symlink-based partitioning in favour of CSV-driven loading
- Add split cache validation via config.json and file existence checks
@victormvy victormvy self-assigned this May 11, 2026
@victormvy victormvy added enhancement New feature or request testing Testing related issue or pull request labels May 11, 2026
@victormvy victormvy added the datasets Changes related with datasets label May 11, 2026
@victormvy
victormvy marked this pull request as ready for review May 12, 2026 07:53
victormvy and others added 14 commits May 12, 2026 10:30
[MNT] Use GPU runner wrapper script to avoid OOM errors
…onfig hashing

- Replace filesystem-based partition logic with CSV-based train/test splits
- Introduce deterministic cache key based on ranges, test_size and version
- Persist split configuration in JSON alongside cached splits
- Remove symlink-based partitioning in favour of CSV-driven loading
- Add split cache validation via config.json and file existence checks
@victormvy
victormvy requested review from amgomezo and franberchez May 12, 2026 09:54

@franberchez franberchez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @victormvy , great job on the improvement. The new fake dataset definition is better, and giving users the option to download the full dataset with their credentials is a fantastic touch.

@franberchez
franberchez merged commit 21ed6a3 into main May 13, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasets Changes related with datasets enhancement New feature or request testing Testing related issue or pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants