Talip7/scikit-learn-issues-multilabel huggingface dataset:
Plan for SGD and SAGA loss function migration

As a result of #15123, we now have a common private loss function module under `sklearn._loss`. In `sklearn.linear_models` we have 2 algorithms that need Cython version that calculate losses and gradients on single values (not on arrays), namely
- `_plain_sgd` as used in `SGDClassifier`, `SGDRegressor` and `SGDOneClassSVM`; and
- `sag_solver` as used in `LogisticRegression`.

My plan is to break this migration into smaller steps:
1. #27979 Deprecate `loss_function_` attribute in v1.4 which gives access to the Cython loss functions that we want to replace.
2. #27999 change order of Cython loss function arguments to align with the ones in `sklearn._loss`.
3. Carry out the deprecation after release 1.5 (to be released with 1.6)
   #29095
4. #28029 Replace Cython losses with the ones from `sklearn._loss`, except multinomial one
5. #28037 Replace the multinomial loss

COMMENT:
Since all the items in the initial plan have been merged, let's close this issue. We can always open dedicate PRs for follow-up work.

Labels: module:linear_model
Random object not being passed from to Kmeans

### Describe the bug

scikit-learn version 1.3.2, file _discretization.py line 308, the random object is not being passed to KMeans. As a result, runs are not reproducible even if you pass a random seed to KBinsDiscretizer.

### Steps/Code to Reproduce

kbd = KBinsDiscretizer(n_bins=5, encode='ordinal',
                                               strategy='kmeans', random_state=42)
kdb.fit(X)
# this will reproduce different results each time

### Expected Results

Same results each time

### Actual Results

Different results between runs

### Versions

```shell
1.3.2
```

COMMENT:
So the line you are talking about is https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/preprocessing/_discretization.py#L308. We provide a deterministic initialisation so I don't think `random_state` would have any effect in the `KMeans`.

It could still be the case that you are seeing different results, but for another reason than `random_state` not being passed to the `KMeans`. If you could provide a fully stand-alone snippet reproducing the issue, this would help us trying to reproduce and eventually fix :pray:

Labels: Bug
Random object not being passed from to Kmeans

### Describe the bug

scikit-learn version 1.3.2, file _discretization.py line 308, the random object is not being passed to KMeans. As a result, runs are not reproducible even if you pass a random seed to KBinsDiscretizer.

### Steps/Code to Reproduce

kbd = KBinsDiscretizer(n_bins=5, encode='ordinal',
                                               strategy='kmeans', random_state=42)
kdb.fit(X)
# this will reproduce different results each time

### Expected Results

Same results each time

### Actual Results

Different results between runs

### Versions

```shell
1.3.2
```

COMMENT:
Closing as no reproducer provided.

Labels: Bug
⚠️ CI failed on Linux_Nightly.pylatest_pip_scipy_dev ⚠️

**CI is still failing on [Linux_Nightly.pylatest_pip_scipy_dev](https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=62037&view=logs&j=dfe99b15-50db-5d7b-b1e9-4105c42527cf)** (Jan 04, 2024)
- Test Collection Failure

COMMENT:
/take

Labels: Needs Triage
⚠️ CI failed on Ubuntu_Jammy_Jellyfish.pymin_conda_forge_openblas_ubuntu_2204 ⚠️

**CI failed on [Ubuntu_Jammy_Jellyfish.pymin_conda_forge_openblas_ubuntu_2204](https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61831&view=logs&j=f71949a9-f9d9-549e-cf45-2e99c7b412d1)** (Dec 23, 2023)
Unable to find junit file. Please see link for details.

COMMENT:
Fixed upstream in conda-forge

Labels: Needs Triage
⚠️ CI failed on Linux_Nightly.pylatest_pip_scipy_dev ⚠️

**CI failed on [Linux_Nightly.pylatest_pip_scipy_dev](https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61831&view=logs&j=dfe99b15-50db-5d7b-b1e9-4105c42527cf)** (Dec 23, 2023)
Unable to find junit file. Please see link for details.

COMMENT:
Fixed upstream in conda-forge

Labels: Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
@scikit-learn-bot

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
@scikit-learn-bot is not going to answer ;)

It is a bit unfortunate that the only thing that we don't control the dependencies of `conda-lock`. I don't know if it is worth trying to hotfix.

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
This should now be solved in condaforge.

Please re-run ci, and let us know if the problem is not solved.

This was caused by a change to condaforge that would have broken all packages using maturin, pydantic was just unfortunate in being the first to release after the change.

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
Hi @samuelcolvin 

Pipeline is still failing:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61825&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
I'm on my mobile, is it the same error?

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
Yes,

It is the same error.

Labels: Bug, Needs Triage
CI is broken due to pydantic update to v2.5.3

### Describe the bug

Hi,

We are unable to run the CI.

Before:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61823&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/e4bb6e00-7c04-4d55-9096-7c81dba4cb76)


Now:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=61824&view=logs&j=dde5042c-7464-5d47-9507-31bdd2ee0a3a&t=7d852497-2547-55fa-986f-0b436c028d7e

![image](https://github.com/scikit-learn/scikit-learn/assets/14976422/0938f879-776f-4b8c-b436-cc883ab5b33c)


### Steps/Code to Reproduce

Just running the CI manually or committing again in any opened pull request.

### Expected Results

The CI works as usual.

### Actual Results


```python

+ conda-lock install --name testvenv ./build_tools/azure/pylatest_conda_forge_mkl_linux-64_conda.lock
Traceback (most recent call last):
  File "/usr/share/miniconda/bin/conda-lock", line 6, in <module>
    from conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/__init__.py", line 3, in <module>
    from conda_lock.conda_lock import main
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 50, in <module>
    from conda_lock.conda_solver import solve_conda
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 20, in <module>
    from conda_lock.invoke_conda import (
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/invoke_conda.py", line 15, in <module>
    from conda_lock.models.channel import Channel
  File "/usr/share/miniconda/lib/python3.11/site-packages/conda_lock/models/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/__init__.py", line 372, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/lib/python3.11/site-packages/pydantic/main.py", line 13, in <module>
    from pydantic_core import PydanticUndefined
ImportError: cannot import name 'PydanticUndefined' from 'pydantic_core' (unknown location)
```


### Versions

```shell
1.4.dev
```

COMMENT:
Working now:

<img width="1120" alt="image" src="https://github.com/scikit-learn/scikit-learn/assets/14976422/6af44ffb-31e1-48a8-ba32-09bb7d41cf78">

Labels: Bug, Needs Triage