zenml-nightly 0.68.1.dev20241102__py3-none-any.whl → 0.68.1.dev20241106__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. zenml/VERSION +1 -1
  2. zenml/artifacts/{load_directory_materializer.py → preexisting_data_materializer.py} +8 -9
  3. zenml/artifacts/utils.py +1 -1
  4. zenml/integrations/__init__.py +3 -1
  5. zenml/integrations/bentoml/materializers/bentoml_bento_materializer.py +19 -31
  6. zenml/integrations/constants.py +1 -0
  7. zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +8 -12
  8. zenml/integrations/huggingface/materializers/huggingface_pt_model_materializer.py +17 -18
  9. zenml/integrations/huggingface/materializers/huggingface_t5_materializer.py +2 -5
  10. zenml/integrations/huggingface/materializers/huggingface_tf_model_materializer.py +17 -18
  11. zenml/integrations/huggingface/materializers/huggingface_tokenizer_materializer.py +2 -3
  12. zenml/integrations/langchain/__init__.py +2 -1
  13. zenml/integrations/langchain/materializers/openai_embedding_materializer.py +28 -2
  14. zenml/integrations/lightgbm/materializers/lightgbm_booster_materializer.py +8 -15
  15. zenml/integrations/lightgbm/materializers/lightgbm_dataset_materializer.py +11 -16
  16. zenml/integrations/openai/__init__.py +1 -1
  17. zenml/integrations/openai/hooks/open_ai_failure_hook.py +39 -14
  18. zenml/integrations/pillow/materializers/pillow_image_materializer.py +17 -20
  19. zenml/integrations/polars/materializers/dataframe_materializer.py +26 -39
  20. zenml/integrations/pycaret/materializers/model_materializer.py +7 -22
  21. zenml/integrations/tensorflow/materializers/keras_materializer.py +11 -22
  22. zenml/integrations/tensorflow/materializers/tf_dataset_materializer.py +8 -15
  23. zenml/integrations/vllm/__init__.py +50 -0
  24. zenml/integrations/vllm/flavors/__init__.py +21 -0
  25. zenml/integrations/vllm/flavors/vllm_model_deployer_flavor.py +91 -0
  26. zenml/integrations/vllm/model_deployers/__init__.py +19 -0
  27. zenml/integrations/vllm/model_deployers/vllm_model_deployer.py +263 -0
  28. zenml/integrations/vllm/services/__init__.py +19 -0
  29. zenml/integrations/vllm/services/vllm_deployment.py +197 -0
  30. zenml/integrations/whylogs/materializers/whylogs_materializer.py +11 -18
  31. zenml/integrations/xgboost/materializers/xgboost_booster_materializer.py +11 -22
  32. zenml/integrations/xgboost/materializers/xgboost_dmatrix_materializer.py +10 -19
  33. zenml/materializers/base_materializer.py +68 -1
  34. zenml/orchestrators/step_runner.py +4 -1
  35. zenml/stack/flavor.py +9 -5
  36. zenml/steps/step_context.py +2 -0
  37. zenml/utils/callback_registry.py +71 -0
  38. {zenml_nightly-0.68.1.dev20241102.dist-info → zenml_nightly-0.68.1.dev20241106.dist-info}/METADATA +1 -1
  39. {zenml_nightly-0.68.1.dev20241102.dist-info → zenml_nightly-0.68.1.dev20241106.dist-info}/RECORD +42 -34
  40. {zenml_nightly-0.68.1.dev20241102.dist-info → zenml_nightly-0.68.1.dev20241106.dist-info}/LICENSE +0 -0
  41. {zenml_nightly-0.68.1.dev20241102.dist-info → zenml_nightly-0.68.1.dev20241106.dist-info}/WHEEL +0 -0
  42. {zenml_nightly-0.68.1.dev20241102.dist-info → zenml_nightly-0.68.1.dev20241106.dist-info}/entry_points.txt +0 -0
@@ -14,7 +14,6 @@
14
14
  """Materializer for Pillow Image objects."""
15
15
 
16
16
  import os
17
- import tempfile
18
17
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Tuple, Type
19
18
 
20
19
  from PIL import Image
@@ -57,16 +56,15 @@ class PillowImageMaterializer(BaseMaterializer):
57
56
  files = io_utils.find_files(self.uri, f"{DEFAULT_IMAGE_FILENAME}.*")
58
57
  filepath = [file for file in files if not fileio.isdir(file)][0]
59
58
 
60
- # create a temporary folder
61
- temp_dir = tempfile.TemporaryDirectory(prefix="zenml-temp-")
62
- temp_file = os.path.join(
63
- temp_dir.name,
64
- f"{DEFAULT_IMAGE_FILENAME}{os.path.splitext(filepath)[1]}",
65
- )
59
+ with self.get_temporary_directory(delete_at_exit=False) as temp_dir:
60
+ temp_file = os.path.join(
61
+ temp_dir,
62
+ f"{DEFAULT_IMAGE_FILENAME}{os.path.splitext(filepath)[1]}",
63
+ )
66
64
 
67
- # copy from artifact store to temporary file
68
- fileio.copy(filepath, temp_file)
69
- return Image.open(temp_file)
65
+ # copy from artifact store to temporary file
66
+ fileio.copy(filepath, temp_file)
67
+ return Image.open(temp_file)
70
68
 
71
69
  def save(self, image: Image.Image) -> None:
72
70
  """Write to artifact store.
@@ -74,18 +72,17 @@ class PillowImageMaterializer(BaseMaterializer):
74
72
  Args:
75
73
  image: An Image.Image object.
76
74
  """
77
- temp_dir = tempfile.TemporaryDirectory(prefix="zenml-temp-")
78
- file_extension = image.format or DEFAULT_IMAGE_EXTENSION
79
- full_filename = f"{DEFAULT_IMAGE_FILENAME}.{file_extension}"
80
- temp_image_path = os.path.join(temp_dir.name, full_filename)
75
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
76
+ file_extension = image.format or DEFAULT_IMAGE_EXTENSION
77
+ full_filename = f"{DEFAULT_IMAGE_FILENAME}.{file_extension}"
78
+ temp_image_path = os.path.join(temp_dir, full_filename)
81
79
 
82
- # save the image in a temporary directory
83
- image.save(temp_image_path)
80
+ # save the image in a temporary directory
81
+ image.save(temp_image_path)
84
82
 
85
- # copy the saved image to the artifact store
86
- artifact_store_path = os.path.join(self.uri, full_filename)
87
- io_utils.copy(temp_image_path, artifact_store_path, overwrite=True) # type: ignore[attr-defined]
88
- temp_dir.cleanup()
83
+ # copy the saved image to the artifact store
84
+ artifact_store_path = os.path.join(self.uri, full_filename)
85
+ io_utils.copy(temp_image_path, artifact_store_path, overwrite=True) # type: ignore[attr-defined]
89
86
 
90
87
  def save_visualizations(
91
88
  self, image: Image.Image
@@ -14,7 +14,6 @@
14
14
  """Polars materializer."""
15
15
 
16
16
  import os
17
- import tempfile
18
17
  from typing import Any, ClassVar, Tuple, Type, Union
19
18
 
20
19
  import polars as pl
@@ -22,7 +21,6 @@ import pyarrow as pa # type: ignore
22
21
  import pyarrow.parquet as pq # type: ignore
23
22
 
24
23
  from zenml.enums import ArtifactType
25
- from zenml.io import fileio
26
24
  from zenml.materializers.base_materializer import BaseMaterializer
27
25
  from zenml.utils import io_utils
28
26
 
@@ -45,35 +43,29 @@ class PolarsMaterializer(BaseMaterializer):
45
43
  Returns:
46
44
  A Polars data frame or series.
47
45
  """
48
- # Create a temporary directory to store the model
49
- temp_dir = tempfile.TemporaryDirectory()
46
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
47
+ io_utils.copy_dir(self.uri, temp_dir)
50
48
 
51
- # Copy from artifact store to temporary directory
52
- io_utils.copy_dir(self.uri, temp_dir.name)
53
-
54
- # Load the data from the temporary directory
55
- table = pq.read_table(
56
- os.path.join(temp_dir.name, "dataframe.parquet").replace("\\", "/")
57
- )
58
-
59
- # If the data is of type pl.Series, convert it back to a pyarrow array
60
- # instead of a table.
61
- if (
62
- table.schema.metadata
63
- and b"zenml_is_pl_series" in table.schema.metadata
64
- ):
65
- isinstance_bytes = table.schema.metadata[b"zenml_is_pl_series"]
66
- isinstance_series = bool.from_bytes(isinstance_bytes, "big")
67
- if isinstance_series:
68
- table = table.column(0)
49
+ # Load the data from the temporary directory
50
+ table = pq.read_table(
51
+ os.path.join(temp_dir, "dataframe.parquet").replace("\\", "/")
52
+ )
69
53
 
70
- # Convert the table to a Polars data frame or series
71
- data = pl.from_arrow(table)
54
+ # If the data is of type pl.Series, convert it back to a pyarrow array
55
+ # instead of a table.
56
+ if (
57
+ table.schema.metadata
58
+ and b"zenml_is_pl_series" in table.schema.metadata
59
+ ):
60
+ isinstance_bytes = table.schema.metadata[b"zenml_is_pl_series"]
61
+ isinstance_series = bool.from_bytes(isinstance_bytes, "big")
62
+ if isinstance_series:
63
+ table = table.column(0)
72
64
 
73
- # Cleanup and return
74
- fileio.rmtree(temp_dir.name)
65
+ # Convert the table to a Polars data frame or series
66
+ data = pl.from_arrow(table)
75
67
 
76
- return data
68
+ return data
77
69
 
78
70
  def save(self, data: Union[pl.DataFrame, pl.Series]) -> None:
79
71
  """Writes Polars data to the artifact store.
@@ -107,15 +99,10 @@ class PolarsMaterializer(BaseMaterializer):
107
99
  {b"zenml_is_pl_series": isinstance_bytes}
108
100
  )
109
101
 
110
- # Create a temporary directory to store the model
111
- temp_dir = tempfile.TemporaryDirectory()
112
-
113
- # Write the table to a Parquet file
114
- path = os.path.join(temp_dir.name, "dataframe.parquet").replace(
115
- "\\", "/"
116
- )
117
- pq.write_table(table, path) # Uses lz4 compression by default
118
- io_utils.copy_dir(temp_dir.name, self.uri)
119
-
120
- # Remove the temporary directory
121
- fileio.rmtree(temp_dir.name)
102
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
103
+ # Write the table to a Parquet file
104
+ path = os.path.join(temp_dir, "dataframe.parquet").replace(
105
+ "\\", "/"
106
+ )
107
+ pq.write_table(table, path) # Uses lz4 compression by default
108
+ io_utils.copy_dir(temp_dir, self.uri)
@@ -13,7 +13,6 @@
13
13
  # permissions and limitations under the License.
14
14
  """PyCaret materializer."""
15
15
 
16
- import tempfile
17
16
  from typing import (
18
17
  Any,
19
18
  Type,
@@ -65,7 +64,6 @@ from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
65
64
  from xgboost import XGBClassifier, XGBRegressor
66
65
 
67
66
  from zenml.enums import ArtifactType
68
- from zenml.io import fileio
69
67
  from zenml.materializers.base_materializer import BaseMaterializer
70
68
  from zenml.utils import io_utils
71
69
 
@@ -133,19 +131,10 @@ class PyCaretMaterializer(BaseMaterializer):
133
131
  Returns:
134
132
  A PyCaret model.
135
133
  """
136
- # Create a temporary directory to store the model
137
- temp_dir = tempfile.TemporaryDirectory()
138
-
139
- # Copy from artifact store to temporary directory
140
- io_utils.copy_dir(self.uri, temp_dir.name)
141
-
142
- # Load the model from the temporary directory
143
- model = load_model(temp_dir.name)
144
-
145
- # Cleanup and return
146
- fileio.rmtree(temp_dir.name)
147
-
148
- return model
134
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
135
+ io_utils.copy_dir(self.uri, temp_dir)
136
+ model = load_model(temp_dir)
137
+ return model
149
138
 
150
139
  def save(self, model: Any) -> None:
151
140
  """Writes a PyCaret model to the artifact store.
@@ -153,10 +142,6 @@ class PyCaretMaterializer(BaseMaterializer):
153
142
  Args:
154
143
  model: Any of the supported models.
155
144
  """
156
- # Create a temporary directory to store the model
157
- temp_dir = tempfile.TemporaryDirectory()
158
- save_model(model, temp_dir.name)
159
- io_utils.copy_dir(temp_dir.name, self.uri)
160
-
161
- # Remove the temporary directory
162
- fileio.rmtree(temp_dir.name)
145
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
146
+ save_model(model, temp_dir)
147
+ io_utils.copy_dir(temp_dir, self.uri)
@@ -14,7 +14,6 @@
14
14
  """Implementation of the TensorFlow Keras materializer."""
15
15
 
16
16
  import os
17
- import tempfile
18
17
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Tuple, Type
19
18
 
20
19
  import tensorflow as tf
@@ -22,7 +21,6 @@ from tensorflow.python import keras as tf_keras
22
21
  from tensorflow.python.keras.utils.layer_utils import count_params
23
22
 
24
23
  from zenml.enums import ArtifactType
25
- from zenml.io import fileio
26
24
  from zenml.materializers.base_materializer import BaseMaterializer
27
25
  from zenml.utils import io_utils
28
26
 
@@ -49,20 +47,15 @@ class KerasMaterializer(BaseMaterializer):
49
47
  Returns:
50
48
  A keras.Model model.
51
49
  """
52
- # Create a temporary directory to store the model
53
- temp_dir = tempfile.TemporaryDirectory()
50
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
51
+ # Copy from artifact store to temporary directory
52
+ temp_model_file = os.path.join(temp_dir, self.MODEL_FILE_NAME)
53
+ io_utils.copy_dir(self.uri, temp_dir)
54
54
 
55
- # Copy from artifact store to temporary directory
56
- temp_model_file = os.path.join(temp_dir.name, self.MODEL_FILE_NAME)
57
- io_utils.copy_dir(self.uri, temp_dir.name)
55
+ # Load the model from the temporary directory
56
+ model = tf.keras.models.load_model(temp_model_file)
58
57
 
59
- # Load the model from the temporary directory
60
- model = tf.keras.models.load_model(temp_model_file)
61
-
62
- # Cleanup and return
63
- fileio.rmtree(temp_dir.name)
64
-
65
- return model
58
+ return model
66
59
 
67
60
  def save(self, model: tf_keras.Model) -> None:
68
61
  """Writes a keras model to the artifact store.
@@ -70,14 +63,10 @@ class KerasMaterializer(BaseMaterializer):
70
63
  Args:
71
64
  model: A keras.Model model.
72
65
  """
73
- # Create a temporary directory to store the model
74
- temp_dir = tempfile.TemporaryDirectory()
75
- temp_model_file = os.path.join(temp_dir.name, self.MODEL_FILE_NAME)
76
- model.save(temp_model_file)
77
- io_utils.copy_dir(temp_dir.name, self.uri)
78
-
79
- # Remove the temporary directory
80
- fileio.rmtree(temp_dir.name)
66
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
67
+ temp_model_file = os.path.join(temp_dir, self.MODEL_FILE_NAME)
68
+ model.save(temp_model_file)
69
+ io_utils.copy_dir(temp_dir, self.uri)
81
70
 
82
71
  def extract_metadata(
83
72
  self, model: tf_keras.Model
@@ -14,13 +14,11 @@
14
14
  """Implementation of the TensorFlow dataset materializer."""
15
15
 
16
16
  import os
17
- import tempfile
18
17
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Tuple, Type
19
18
 
20
19
  import tensorflow as tf
21
20
 
22
21
  from zenml.enums import ArtifactType
23
- from zenml.io import fileio
24
22
  from zenml.materializers.base_materializer import BaseMaterializer
25
23
  from zenml.utils import io_utils
26
24
 
@@ -45,13 +43,11 @@ class TensorflowDatasetMaterializer(BaseMaterializer):
45
43
  Returns:
46
44
  A tf.data.Dataset object.
47
45
  """
48
- temp_dir = tempfile.mkdtemp()
49
- io_utils.copy_dir(self.uri, temp_dir)
50
- path = os.path.join(temp_dir, DEFAULT_FILENAME)
51
- dataset = tf.data.Dataset.load(path)
52
- # Don't delete the temporary directory here as the dataset is lazily
53
- # loaded and needs to read it when the object gets used
54
- return dataset
46
+ with self.get_temporary_directory(delete_at_exit=False) as temp_dir:
47
+ io_utils.copy_dir(self.uri, temp_dir)
48
+ path = os.path.join(temp_dir, DEFAULT_FILENAME)
49
+ dataset = tf.data.Dataset.load(path)
50
+ return dataset
55
51
 
56
52
  def save(self, dataset: tf.data.Dataset) -> None:
57
53
  """Persists a tf.data.Dataset object.
@@ -59,15 +55,12 @@ class TensorflowDatasetMaterializer(BaseMaterializer):
59
55
  Args:
60
56
  dataset: The dataset to persist.
61
57
  """
62
- temp_dir = tempfile.TemporaryDirectory()
63
- path = os.path.join(temp_dir.name, DEFAULT_FILENAME)
64
- try:
58
+ with self.get_temporary_directory(delete_at_exit=True) as temp_dir:
59
+ path = os.path.join(temp_dir, DEFAULT_FILENAME)
65
60
  tf.data.Dataset.save(
66
61
  dataset, path, compression=None, shard_func=None
67
62
  )
68
- io_utils.copy_dir(temp_dir.name, self.uri)
69
- finally:
70
- fileio.rmtree(temp_dir.name)
63
+ io_utils.copy_dir(temp_dir, self.uri)
71
64
 
72
65
  def extract_metadata(
73
66
  self, dataset: tf.data.Dataset
@@ -0,0 +1,50 @@
1
+ # Copyright (c) ZenML GmbH 2024. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12
+ # or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+ """Initialization for the ZenML vLLM integration."""
15
+ from typing import List, Type
16
+ from zenml.integrations.integration import Integration
17
+ from zenml.stack import Flavor
18
+ from zenml.logger import get_logger
19
+ from zenml.integrations.constants import VLLM
20
+
21
+ VLLM_MODEL_DEPLOYER = "vllm"
22
+
23
+ logger = get_logger(__name__)
24
+
25
+
26
+ class VLLMIntegration(Integration):
27
+ """Definition of vLLM integration for ZenML."""
28
+
29
+ NAME = VLLM
30
+
31
+ REQUIREMENTS = ["vllm>=0.6.0,<0.7.0", "openai>=1.0.0"]
32
+
33
+ @classmethod
34
+ def activate(cls) -> None:
35
+ """Activates the integration."""
36
+ from zenml.integrations.vllm import services
37
+
38
+ @classmethod
39
+ def flavors(cls) -> List[Type[Flavor]]:
40
+ """Declare the stack component flavors for the vLLM integration.
41
+
42
+ Returns:
43
+ List of stack component flavors for this integration.
44
+ """
45
+ from zenml.integrations.vllm.flavors import VLLMModelDeployerFlavor
46
+
47
+ return [VLLMModelDeployerFlavor]
48
+
49
+
50
+ VLLMIntegration.check_installation()
@@ -0,0 +1,21 @@
1
+ # Copyright (c) ZenML GmbH 2024. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12
+ # or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+ """vLLM integration flavors."""
15
+
16
+ from zenml.integrations.vllm.flavors.vllm_model_deployer_flavor import ( # noqa
17
+ VLLMModelDeployerConfig,
18
+ VLLMModelDeployerFlavor,
19
+ )
20
+
21
+ __all__ = ["VLLMModelDeployerConfig", "VLLMModelDeployerFlavor"]
@@ -0,0 +1,91 @@
1
+ # Copyright (c) ZenML GmbH 2024. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12
+ # or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+ """vLLM model deployer flavor."""
15
+
16
+ from typing import TYPE_CHECKING, Optional, Type
17
+
18
+ from zenml.integrations.vllm import VLLM_MODEL_DEPLOYER
19
+ from zenml.model_deployers.base_model_deployer import (
20
+ BaseModelDeployerConfig,
21
+ BaseModelDeployerFlavor,
22
+ )
23
+
24
+ if TYPE_CHECKING:
25
+ from zenml.integrations.vllm.model_deployers import VLLMModelDeployer
26
+
27
+
28
+ class VLLMModelDeployerConfig(BaseModelDeployerConfig):
29
+ """Configuration for vLLM Inference model deployer."""
30
+
31
+ service_path: str = ""
32
+
33
+
34
+ class VLLMModelDeployerFlavor(BaseModelDeployerFlavor):
35
+ """vLLM model deployer flavor."""
36
+
37
+ @property
38
+ def name(self) -> str:
39
+ """Name of the flavor.
40
+
41
+ Returns:
42
+ The name of the flavor.
43
+ """
44
+ return VLLM_MODEL_DEPLOYER
45
+
46
+ @property
47
+ def docs_url(self) -> Optional[str]:
48
+ """A url to point at docs explaining this flavor.
49
+
50
+ Returns:
51
+ A flavor docs url.
52
+ """
53
+ return self.generate_default_docs_url()
54
+
55
+ @property
56
+ def sdk_docs_url(self) -> Optional[str]:
57
+ """A url to point at SDK docs explaining this flavor.
58
+
59
+ Returns:
60
+ A flavor SDK docs url.
61
+ """
62
+ return self.generate_default_sdk_docs_url()
63
+
64
+ @property
65
+ def logo_url(self) -> str:
66
+ """A url to represent the flavor in the dashboard.
67
+
68
+ Returns:
69
+ The flavor logo.
70
+ """
71
+ return "https://public-flavor-logos.s3.eu-central-1.amazonaws.com/model_deployer/vllm.png"
72
+
73
+ @property
74
+ def config_class(self) -> Type[VLLMModelDeployerConfig]:
75
+ """Returns `VLLMModelDeployerConfig` config class.
76
+
77
+ Returns:
78
+ The config class.
79
+ """
80
+ return VLLMModelDeployerConfig
81
+
82
+ @property
83
+ def implementation_class(self) -> Type["VLLMModelDeployer"]:
84
+ """Implementation class for this flavor.
85
+
86
+ Returns:
87
+ The implementation class.
88
+ """
89
+ from zenml.integrations.vllm.model_deployers import VLLMModelDeployer
90
+
91
+ return VLLMModelDeployer
@@ -0,0 +1,19 @@
1
+ # Copyright (c) ZenML GmbH 2024. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12
+ # or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+ """Initialization of the vLLM model deployers."""
15
+ from zenml.integrations.vllm.model_deployers.vllm_model_deployer import ( # noqa
16
+ VLLMModelDeployer,
17
+ )
18
+
19
+ __all__ = ["VLLMModelDeployer"]