Enable exporting trained models to text files to be able to import later

### Describe the workflow you want to enable

```python
from sklearn.datasets import fetch_california_housing
from sklearn.ensemble import RandomForestRegressor

# make data
X,y = fetch_california_housing(return_X_y=True)

# instantiate Random-Forest and fit it
rf_model = RandomForestRegressor(min_samples_leaf=5, random_state=0, n_jobs=-1)
rf_model.fit(X, y)

# export model to a text file, inspired by https://xgboost.readthedocs.io/en/release_3.0.0/python/python_api.html#xgboost.XGBRegressor.save_model
rf_model.save_model("model.json")


#################### in a new python environment
from sklearn.ensemble import RandomForestRegressor
rf_model2 = RandomForestRegressor(min_samples_leaf=5, random_state=0, n_jobs=-1)
rf_model2.load_model("model.json")
```

### Describe your proposed solution

The current recommended way I believe is to export fit (or trained) models is to serialize them using joblib, which depends on python version, joblib version and scikit-learn version too, and I presume this may lead to issues with OS and CPU architecture as well (windows or  GNU Linux and x86 or ARM64).

So, I request a way to export model's trained weights (or other relevant things like bins & trees for RandomForestRegressor) for it be to loaded from any scikit-learn version or python version or operating system. This is just how the big packages like [xgboost](https://xgboost.readthedocs.io/en/release_3.0.0/python/python_api.html#xgboost.XGBRegressor.save_model) and pytorch ([using `state_dict`](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.load_state_dict)) and hence transformers,  handle things. 

This would enable to change environments and platforms easily without having to train model for the new package-versions, architecture and OS again or every time an update in them is required.

### Describe alternatives you've considered, if relevant

There is no alternative to everything that scikit-learn offers as of now.

### Additional context

This has been provied above.

COMMENT:
> I believe that the open source community would step up and do the implementation given a plan/approach for what needs to be done.

As I said earlier, the problem is not the implementation of the serialization format or the migration code for the few cases where there is actually scikit-learn code change that requires extra transformation (e.g. attribute renaming) logic at loading time. The actual work is setting up a repo with CI configuration and test harness to generate serialized model files for a few scikit-learn versions and check nightly that it's still possible to load them and use them (by computing reproducing score metrics on held out validation data for instance) with the nightly builds of the scikit-learn `main` branch. And then be reactive and maintain the migration code whenever a new case is detected.

For those interested, please take a look at `skops.io` that already provides a base architecture to serialize scikit-learn estimators with a format that should make it possible to implement such a migration tool and try to build on top.

Labels: New Feature, Needs Decision - Include Feature