Skip to content
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

Sklearn type transformer should be automatically loaded with import flytekit #1423

Merged
merged 7 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ sphinx:
python:
install:
- requirements: doc-requirements.txt
- requirements: docs/requirements.txt
7 changes: 7 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TODO: Remove after buf migration is done and packages updated, see doc-requirements.in
# skl2onnx and tf2onnx added here so that the plugin API reference is rendered,
# with the caveat that the docs build environment has the environment variable
# PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python set so that protobuf can be parsed
# using Python, which is acceptable for docs building.
skl2onnx
tf2onnx
2 changes: 1 addition & 1 deletion flytekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
from flytekit.core.workflow import ImperativeWorkflow as Workflow
from flytekit.core.workflow import WorkflowFailurePolicy, reference_workflow, workflow
from flytekit.deck import Deck
from flytekit.extras import pytorch, tensorflow
from flytekit.extras import pytorch, sklearn, tensorflow
from flytekit.extras.persistence import GCSPersistence, HttpPersistence, S3Persistence
from flytekit.loggers import logger
from flytekit.models.common import Annotations, AuthRole, Labels
Expand Down
5 changes: 3 additions & 2 deletions flytekit/extras/pytorch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"""
Flytekit PyTorch
=========================================
.. currentmodule:: flytekit.extras.pytorch

.. autosummary::
:template: custom.rst
:toctree: generated/

PyTorchCheckpoint
PyTorchCheckpointTransformer
PyTorchModuleTransformer
PyTorchTensorTransformer
"""
from flytekit.loggers import logger

Expand Down
4 changes: 2 additions & 2 deletions flytekit/extras/sklearn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
Flytekit Sklearn
=========================================
.. currentmodule:: flytekit.extras.sklearn

.. autosummary::
:template: custom.rst
:toctree: generated/

SklearnEstimatorTransformer
"""
from flytekit.loggers import logger

Expand Down
11 changes: 11 additions & 0 deletions flytekit/extras/tensorflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
"""
.. currentmodule:: flytekit.extras.tensorflow

.. autosummary::
:template: custom.rst
:toctree: generated/

TensorFlowRecordFileTransformer
TensorFlowRecordsDirTransformer
"""

from flytekit.loggers import logger

# TODO: abstract this out so that there's an established pattern for registering plugins
Expand Down