Skip to content

feat: make datasets and accelerate optional dependencies - #213

Merged
chichun-charlie-liu merged 3 commits into
mainfrom
afasoli/optional_imports
Oct 8, 2026
Merged

chichun-charlie-liu merged 3 commits into
mainfrom
afasoli/optional_imports

Conversation

@andrea-fasoli

Copy link
Copy Markdown
Collaborator

The version caps datasets and accelerate bring (e.g. fsspec<=2026.2.0 from datasets 4.x) is blocking vulnerability updates.
Neither package is needed by the aiu_addons, which is the only part of fms-mo that FMS loads.
This PR make these two packages installation optional.

Related issues

Closes #212

Changes

  • pyproject.toml: moved datasets into a new data extra and accelerate into a new launcher extra. Both are included in opt, examples and test, so the Docker image and CI are unchanged.
  • run_quant.py, dq.py, utils/calib_data.py: if datasets is missing, importing these modules now raises an ImportError that says to install fms-model-optimizer[data].
  • README.md: documented the new extras.

Breaking change

With a plain pip install fms-model-optimizer, running run_quant or direct quantization now requires the [data] extra.

Verification

  • Clean install without extras: datasets and accelerate are not installed. All aiu_addons modules import, and neither package is loaded afterwards.
  • The import guards raise the expected error.
  • Unit tests are passing.

Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
@andrea-fasoli andrea-fasoli changed the title Make datasets and accelerate optional dependencies [feat] make datasets and accelerate optional dependencies Oct 7, 2026
@andrea-fasoli andrea-fasoli changed the title [feat] make datasets and accelerate optional dependencies feat: make datasets and accelerate optional dependencies Oct 7, 2026
@github-actions github-actions Bot added the feat label Oct 7, 2026

@chichun-charlie-liu chichun-charlie-liu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm, thx!

@chichun-charlie-liu
chichun-charlie-liu merged commit f9bff8f into main Oct 8, 2026
15 of 17 checks passed
@chichun-charlie-liu
chichun-charlie-liu deleted the afasoli/optional_imports branch October 8, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make datasets and accelerate packages optional

2 participants