Talip7/scikit-learn-issues-multilabel huggingface dataset:
Deprecate murmurhash3_32

`sklearn.utils.murmurhash3_32` is part of our API, but we don't use it anywhere internally.
I propose to deprecate and finally remove it. The standard Python [`hash`](https://docs.python.org/3/library/functions.html#hash) function using SipHash per [PEP0456](https://peps.python.org/pep-0456/) might serve as a good replacement depending on the use case.

COMMENT:
One thing I have learnt which is obvious now that I know it is that the value of `hash("hello world")` changes each time you start Python (at least in 3.10). This is because they use a seed for the hash function which is determined when Python starts up. I think this means we can't use `hash` directly because you'd like hashes to be the same for something like `HashingVectorizer`.

Labels: API, Breaking Change, cython
Deprecate murmurhash3_32

`sklearn.utils.murmurhash3_32` is part of our API, but we don't use it anywhere internally.
I propose to deprecate and finally remove it. The standard Python [`hash`](https://docs.python.org/3/library/functions.html#hash) function using SipHash per [PEP0456](https://peps.python.org/pep-0456/) might serve as a good replacement depending on the use case.

COMMENT:
Python's `hash` is Python API only. The hashing vectorizer has a Cython for loop. It would be detrimental to replace it via a Python loop from a performance point of view.

Labels: API, Breaking Change, cython
Deprecate murmurhash3_32

`sklearn.utils.murmurhash3_32` is part of our API, but we don't use it anywhere internally.
I propose to deprecate and finally remove it. The standard Python [`hash`](https://docs.python.org/3/library/functions.html#hash) function using SipHash per [PEP0456](https://peps.python.org/pep-0456/) might serve as a good replacement depending on the use case.

COMMENT:
So let's keep our internal hash function, but deprecate the public `sklearn.utils.murmurhash3_32`.

Labels: API, Breaking Change, cython
Deprecate murmurhash3_32

`sklearn.utils.murmurhash3_32` is part of our API, but we don't use it anywhere internally.
I propose to deprecate and finally remove it. The standard Python [`hash`](https://docs.python.org/3/library/functions.html#hash) function using SipHash per [PEP0456](https://peps.python.org/pep-0456/) might serve as a good replacement depending on the use case.

COMMENT:
I see 4 maintainers +1 to make the public version private. I think it's enough to remove the "needs decision" tag.

Labels: API, Breaking Change, cython
Deprecate murmurhash3_32

`sklearn.utils.murmurhash3_32` is part of our API, but we don't use it anywhere internally.
I propose to deprecate and finally remove it. The standard Python [`hash`](https://docs.python.org/3/library/functions.html#hash) function using SipHash per [PEP0456](https://peps.python.org/pep-0456/) might serve as a good replacement depending on the use case.

COMMENT:
We could decide to use `hash` from the c++ std lib instead of relying on our own implementation. But
- it uses murmurhash2 instead of murmurhash3. I don't know if we really need murmurhash3 though
- it would change the behavior

Labels: API, Breaking Change, cython
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@davitacols your answers seems to be generated using a generative model like GPT. We do not accept such contributions. If you want, you can open a PR once the discussion here has concluded that we would like to implement such a solution.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@jeremiedbb Do you think that we have code from callbacks that should be shared with the fetcher if we go in this direction?

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
Not at all, but in fetchers it's rather easy to add a progress bar.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
Maybe it could the first way to introduce `rich` as an optional dependency.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
If this feature is adopted, I would like to implement and PR about this feature. 😄

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
In general scikit-learn is a "quiet" library, in the sense that it doesn't produce a lot of output while you use it. In general I think this is a good thing. However I can see that it is not great if there is no feedback at all when an operation takes a long time. It leaves the user wondering "is this working? broken? stuck? just slow?".

Maybe a way forward is to introduce some more "interactive feedback" for long running things and gate it on a config option? And then something like "give very basic feedback as default or fancy feedback if `rich` is installed". Then start out with the default being the current behaviour (no feedback) and depending on what people tell us about it either switch to "default on" or even attempt complex things like "are we being run in a notebook?" to decide whether or not to show interactive feedback.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@betatim I agree with you that we could have a opt-in/out solution and then change the default in the future.

> It leaves the user wondering "is this working? broken? stuck? just slow?"

This is also what I feel and users request progress bar for the estimators. I really think that this is a UX isssue that we could improve. For estimators, it requires probably more thoughts but for fetchers it might be easier.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
Since this is not handled by our callbacks proposal, I'm happy to add a callback here to support tqdm or whatever the user wants to use.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@mirusu400 Do you still wish to implement this feature. Since the callback will use rich for the progress bar, I think it makes sense to have the same backend. You can a look at what is being implement there (https://github.com/scikit-learn/scikit-learn/pull/27663/files#diff-d2987aaf9a2d5159f49ade8193e4890d66a6ac3351494175da0ac38ee6fe7eae)

An important thing is to consider that `rich` will be an optional dependence. I assume that we could make it easy and create a private module centralizing the rich tools that would be shared in the future.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@glemaitre If so, should I fork that branch, create a feature using their backend, and send them a PR? Or can I just create a new callback function using `rich`?

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
You can start from the main branch. No need to build upon the callback branch.

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
@glemaitre Do you guys still need a support on this? I don't see any recent activity on the created PR or this issue?

Labels: New Feature
Using tqdm or progress bars while downloading datasets using `urlretreve`

### Describe the workflow you want to enable

https://github.com/scikit-learn/scikit-learn/blob/4ca01961969a0c9e1c7c48410e0976bb04a92703/sklearn/datasets/_base.py#L1368-L1399

When we fetch remote data using the function `_fetch_remote`, we cannot verify that we are downloading it normally because there is no interaction action.

Depending on the download environment, it may take a long time, and users may think that there is an error in the program if they do not see it.

### Describe your proposed solution

I suggest that make an option to display the progress bar that we download using tqdm or other methods.

We can simply implement using [urlretreve reporthook parameter](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve), Here are some example.

https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

I've also suggest that adding more options: timeout, retrying.

COMMENT:
You can ask in the PR to see if it is stalled I think. You may check the [contributor guide](https://scikit-learn.org/stable/developers/contributing.html#stalled-pull-requests) to see how.

Labels: New Feature
Bumping minimum NumPy version to support NumPy 1.X and 2.0

According to [NumPy's build-time dependency docs](https://numpy.org/devdocs//dev/depending_on_numpy.html#build-time-dependency), NumPy 1.25 is backward compatible with NumPy 1.19. (We'll no longer need [oldest-supported-numpy](https://github.com/scipy/oldest-supported-numpy/))

When NumPy 2.0 comes out, we'll need to build with NumPy 2.0 to support NumPy 2.0, which will be backward compatible with NumPy 1.XX. This 1.XX will likely be >= 1.19, so we will need to **bump our NumPy minimum version** to support NumPy 2.0 and 1.XX.

COMMENT:
Sounds like a good plan. We should check what happens with old Ubuntu LTS (can we move to a newer Ubuntu LTS?), that was something that trip us up last time I tried to increase the minimum Numpy version.

---

Out of curiosity, reading the Numpy docs on this: could we configure our build to support an older version of Numpy than 1.19? It sounds like the default "backwards compatible C API" that Numpy has corresponds to "oldest Numpy that supports the currently oldest Python version", which makes me wonder if one could configure it to support even older versions?

xref https://github.com/scikit-learn/scikit-learn/issues/27075

Labels: Build / CI
Bumping minimum NumPy version to support NumPy 1.X and 2.0

According to [NumPy's build-time dependency docs](https://numpy.org/devdocs//dev/depending_on_numpy.html#build-time-dependency), NumPy 1.25 is backward compatible with NumPy 1.19. (We'll no longer need [oldest-supported-numpy](https://github.com/scipy/oldest-supported-numpy/))

When NumPy 2.0 comes out, we'll need to build with NumPy 2.0 to support NumPy 2.0, which will be backward compatible with NumPy 1.XX. This 1.XX will likely be >= 1.19, so we will need to **bump our NumPy minimum version** to support NumPy 2.0 and 1.XX.

COMMENT:
For Ubuntu 22.04 LTS, the [NumPy version is 1.21](https://packages.ubuntu.com/jammy/python3-numpy).

> which makes me wonder if one could configure it to support even older versions?

We have been doing it by building on the oldest supported numpy. By looking at https://github.com/scikit-learn/scikit-learn/pull/27735, we can continue doing this for older Python version and use NumPy 2.0 for newer Python versions.

Labels: Build / CI
Bumping minimum NumPy version to support NumPy 1.X and 2.0

According to [NumPy's build-time dependency docs](https://numpy.org/devdocs//dev/depending_on_numpy.html#build-time-dependency), NumPy 1.25 is backward compatible with NumPy 1.19. (We'll no longer need [oldest-supported-numpy](https://github.com/scipy/oldest-supported-numpy/))

When NumPy 2.0 comes out, we'll need to build with NumPy 2.0 to support NumPy 2.0, which will be backward compatible with NumPy 1.XX. This 1.XX will likely be >= 1.19, so we will need to **bump our NumPy minimum version** to support NumPy 2.0 and 1.XX.

COMMENT:
With #27735 merged, I do not think we need to do anything. The minimum supported NumPy is consistent with https://github.com/scipy/oldest-supported-numpy.

Labels: Build / CI