-
Notifications
You must be signed in to change notification settings - Fork 183
DOC: Document serialization of objects #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
DOC: Document serialization of objects #2729
Conversation
|
||
.. warning:: Note that, unlike objects from |sklearn|, objects from the |sklearnex| will not necessarily issue a warning when deserializing them with an incompatible library version. | ||
|
||
Serialization of GPU models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alexsandruss @ethanglaser Feel free to add a paragraph or subsection about how serialization of distributed models works.
doc/sources/serialization.rst
Outdated
Serialization of GPU models | ||
--------------------------- | ||
|
||
Be aware that if using the :ref:`target offload option <target_offload>` to fit models on GPU or on another SyCL device, upon deserialization of those models, the internal data behind them will be re-created on host (CPU), hence the deserialized models will become CPU/host ones and will not be able to make predictions on GPU data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its always 'SYCL' https://www.khronos.org/sycl/
|
||
__all__ = ["get_config", "set_config", "config_context"] | ||
|
||
tab = " " if (sys.version_info.major == 3 and sys.version_info.minor < 13) else "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats going on here with the tabs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 3.13 changed how it deals with leading whitespace in docstrings.
__all__ = ["get_config", "set_config", "config_context"] | ||
|
||
tab = " " if (sys.version_info.major == 3 and sys.version_info.minor < 13) else "" | ||
_options_docstring = f"""Parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you are trying to duplicate the documentation between the various aspects? If so add this to the list of things changed in the description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's trying to unify the docs of two functions that accept the same arguments.
from daal4py.sklearn._utils import sklearn_check_version | ||
from onedal._config import _get_config as onedal_get_config | ||
|
||
__all__ = ["get_config", "set_config", "config_context"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add the __all__
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid exporting other things when doing asterisk imports.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 30 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Description
Dependent on #2721 being merged.
This PR adds a doc page with details about serialization of model objects, documenting behaviors that happen with GPU data, array API, compatibility, and similar.
Checklist:
Completeness and readability
Testing