sgbaird commited on
Commit
adc35bf
·
verified ·
1 Parent(s): ddfbcf8

pin scikit-learn==1.4.1.post1

Browse files

From the logs:
```
===== Application Startup at 2025-05-06 15:11:40 =====

/usr/local/lib/python3.10/site-packages/sklearn/base.py:376: InconsistentVersionWarning: Trying to unpickle estimator _BinMapper from version 1.4.1.post1 when using version 1.5.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
/usr/local/lib/python3.10/site-packages/sklearn/base.py:376: InconsistentVersionWarning: Trying to unpickle estimator HistGradientBoostingRegressor from version 1.4.1.post1 when using version 1.5.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
Running on local URL: http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
IMPORTANT: You are using gradio version 4.22.0, however version 4.44.1 is available, please upgrade.
--------
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
/usr/local/lib/python3.10/site-packages/pydantic/main.py:214: UserWarning: A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.
warnings.warn(
```

Also, when duplicating to my private space:
```
===== Application Startup at 2025-05-06 16:04:31 =====

Traceback (most recent call last):
File "/home/user/app/app.py", line 14, in <module>
model = CrabNetSurrogateModel()
File "/home/user/app/surrogate.py", line 105, in __init__
self.models = load(fpath)
File "/usr/local/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 749, in load
obj = _unpickle(
File "/usr/local/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 626, in _unpickle
obj = unpickler.load()
File "/usr/local/lib/python3.10/pickle.py", line 1213, in load
dispatch[key[0]](self)
File "/usr/local/lib/python3.10/pickle.py", line 1538, in load_stack_global
self.append(self.find_class(module, name))
File "/usr/local/lib/python3.10/pickle.py", line 1582, in find_class
return _getattribute(sys.modules[module], name)[0]
File "/usr/local/lib/python3.10/pickle.py", line 331, in _getattribute
raise AttributeError("Can't get attribute {!r} on {!r}"
AttributeError: Can't get attribute '__pyx_unpickle_CyHalfSquaredError' on <module 'sklearn._loss._loss' from '/usr/local/lib/python3.10/site-packages/sklearn/_loss/_loss.cpython-310-x86_64-linux-gnu.so'>
Traceback (most recent call last):
File "/home/user/app/app.py", line 14, in <module>
model = CrabNetSurrogateModel()
File "/home/user/app/surrogate.py", line 105, in __init__
self.models = load(fpath)
File "/usr/local/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 749, in load
obj = _unpickle(
File "/usr/local/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 626, in _unpickle
obj = unpickler.load()
File "/usr/local/lib/python3.10/pickle.py", line 1213, in load
dispatch[key[0]](self)
File "/usr/local/lib/python3.10/pickle.py", line 1538, in load_stack_global
self.append(self.find_class(module, name))
File "/usr/local/lib/python3.10/pickle.py", line 1582, in find_class
return _getattribute(sys.modules[module], name)[0]
File "/usr/local/lib/python3.10/pickle.py", line 331, in _getattribute
raise AttributeError("Can't get attribute {!r} on {!r}"
AttributeError: Can't get attribute '__pyx_unpickle_CyHalfSquaredError' on <module 'sklearn._loss._loss' from '/usr/local/lib/python3.10/site-packages/sklearn/_loss/_loss.cpython-310-x86_64-linux-gnu.so'>
```

Files changed (1) hide show
  1. requirements.txt +1 -1
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- scikit-learn
2
  pandas
3
  pydantic
4
  gradio
 
1
+ scikit-learn==1.4.1.post1
2
  pandas
3
  pydantic
4
  gradio