Skip to content

Conversation

@brownbaerchen
Copy link
Collaborator

Due Diligence

  • General:
  • Implementation:
    • unit tests: all split configurations tested
    • unit tests: multiple dtypes tested
    • NEW unit tests: MPS tested (1 MPI process, 1 GPU)
    • benchmarks: created for new functionality
    • benchmarks: performance improved or maintained
    • documentation updated where needed

Description

See the discussion in #2084 for the problem and solution. Also, I refactored how the paths to the datasets are set up as pkg_resources is deprecated and the old solution actually did not work with my editable installation of heat. I did make sure that this works with an installation directly from PyPI. That is to say pip install heat[h5py]; python examples/classification/demo_knn.py does work.

Unrelated to the issue that this PR addresses: I see that the IO tests rely on being executed in a certain directory. As far as I can tell, this could be fixed by applying the same refactor from here, i.e. replacing

cls.HDF5_PATH = os.path.join(os.getcwd(), "heat/datasets/iris.h5")

by

cls.HDF5_PATH = os.path.join(os.path.dirname(ht.__file__), "datasets/iris.h5")

let me know if I should do this or if there is any reason not to.

Issue/s resolved:

#2084

Changes proposed:

  • Remove version restriction on scikit-learn in examples dependencies
  • Refactor generation of paths to datasets in tutorials

Type of change

Bug fix

Copy link
Collaborator

@mtar mtar left a comment

Choose a reason for hiding this comment

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

In the examples a HDF5 file is loaded. Perhaps, we should add the library to the examples optional dependencies, too.

Copy link
Collaborator

@mtar mtar left a comment

Choose a reason for hiding this comment

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

Thank you. Looks fine to me as we are only using the dataset in scikit-learn now.

@mtar mtar merged commit 95cb222 into main Jan 15, 2026
6 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 15, 2026
…es (#2086)

* Removed version restriction for scikit-learn in `examples` dependencies

* Added h5py as dependency for examples

---------

Co-authored-by: Michael Tarnawa <[email protected]>
(cherry picked from commit 95cb222)
@github-actions
Copy link
Contributor

@mtar mtar deleted the bugs/2084-_Bug_Unable_to_install_dependencies_for_running_examples_with_Python_3_12 branch January 15, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport stable bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants