diff --git a/examples/classification/demo_knn.py b/examples/classification/demo_knn.py index 3761df8978..5ec89f51f7 100644 --- a/examples/classification/demo_knn.py +++ b/examples/classification/demo_knn.py @@ -5,13 +5,8 @@ import heat as ht from heat.classification.kneighborsclassifier import KNeighborsClassifier -import pkg_resources - # Load dataset from hdf5 file -iris_path = pkg_resources.resource_filename( - pkg_resources.Requirement.parse("heat"), "heat/datasets/iris.h5" -) - +iris_path = f'{os.path.dirname(ht.__file__)}/datasets/iris.h5' X = ht.load_hdf5(iris_path, dataset="data", split=0) # Generate keys for the iris.h5 dataset diff --git a/examples/lasso/demo.py b/examples/lasso/demo.py index 8d6f6a181a..d852314d4e 100644 --- a/examples/lasso/demo.py +++ b/examples/lasso/demo.py @@ -10,15 +10,11 @@ import plotfkt -import pkg_resources - # read scikit diabetes data set diabetes = datasets.load_diabetes() # load diabetes dataset from hdf5 file -diabetes_path = pkg_resources.resource_filename( - pkg_resources.Requirement.parse("heat"), "heat/datasets/diabetes.h5" -) +diabetes_path = f'{os.path.dirname(ht.__file__)}/datasets/diabetes.h5' X = ht.load_hdf5(diabetes_path, dataset="x", split=0) y = ht.load_hdf5(diabetes_path, dataset="y", split=0) diff --git a/pyproject.toml b/pyproject.toml index 30e4f6a5be..c320455081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,11 +61,12 @@ zarr = ["zarr"] ## Examples and tutorial examples = [ - "scikit-learn~=0.24", + "scikit-learn", "matplotlib~=3.1", "jupyter", "ipyparallel", - "pillow" + "pillow", + "h5py>=2.8.0", ] dev = [