zenml-nightly 0.70.0.dev20241119__py3-none-any.whl → 0.70.0.dev20241120__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.
zenml/VERSION CHANGED
@@ -1 +1 @@
1
- 0.70.0.dev20241119
1
+ 0.70.0.dev20241120
@@ -13,6 +13,7 @@
13
13
  # permissions and limitations under the License.
14
14
  """Implementation of a service connector registry."""
15
15
 
16
+ import threading
16
17
  from typing import TYPE_CHECKING, Dict, List, Optional, Union
17
18
 
18
19
  from zenml.logger import get_logger
@@ -34,6 +35,7 @@ class ServiceConnectorRegistry:
34
35
  """Initialize the service connector registry."""
35
36
  self.service_connector_types: Dict[str, ServiceConnectorTypeModel] = {}
36
37
  self.initialized = False
38
+ self.lock = threading.RLock()
37
39
 
38
40
  def register_service_connector_type(
39
41
  self,
@@ -46,23 +48,25 @@ class ServiceConnectorRegistry:
46
48
  service_connector_type: Service connector type.
47
49
  overwrite: Whether to overwrite an existing service connector type.
48
50
  """
49
- if (
50
- service_connector_type.connector_type
51
- not in self.service_connector_types
52
- or overwrite
53
- ):
54
- self.service_connector_types[
51
+ with self.lock:
52
+ if (
55
53
  service_connector_type.connector_type
56
- ] = service_connector_type
57
- logger.debug(
58
- "Registered service connector type "
59
- f"{service_connector_type.connector_type}."
60
- )
61
- else:
62
- logger.debug(
63
- f"Found existing service connector for type "
64
- f"{service_connector_type.connector_type}: Skipping registration."
65
- )
54
+ not in self.service_connector_types
55
+ or overwrite
56
+ ):
57
+ self.service_connector_types[
58
+ service_connector_type.connector_type
59
+ ] = service_connector_type
60
+ logger.debug(
61
+ "Registered service connector type "
62
+ f"{service_connector_type.connector_type}."
63
+ )
64
+ else:
65
+ logger.debug(
66
+ f"Found existing service connector for type "
67
+ f"{service_connector_type.connector_type}: Skipping "
68
+ "registration."
69
+ )
66
70
 
67
71
  def get_service_connector_type(
68
72
  self,
@@ -201,54 +205,61 @@ class ServiceConnectorRegistry:
201
205
  def register_builtin_service_connectors(self) -> None:
202
206
  """Registers the default built-in service connectors."""
203
207
  # Only register built-in service connectors once
204
- if self.initialized:
205
- return
208
+ with self.lock:
209
+ if self.initialized:
210
+ return
206
211
 
207
- self.initialized = True
212
+ self.initialized = True
208
213
 
209
- try:
210
- from zenml.integrations.aws.service_connectors.aws_service_connector import ( # noqa
211
- AWSServiceConnector,
212
- )
213
- except ImportError as e:
214
- logger.warning(f"Could not import AWS service connector: {e}.")
214
+ try:
215
+ from zenml.integrations.aws.service_connectors.aws_service_connector import ( # noqa
216
+ AWSServiceConnector,
217
+ )
218
+ except ImportError as e:
219
+ logger.warning(f"Could not import AWS service connector: {e}.")
215
220
 
216
- try:
217
- from zenml.integrations.gcp.service_connectors.gcp_service_connector import ( # noqa
218
- GCPServiceConnector,
219
- )
220
- except ImportError as e:
221
- logger.warning(f"Could not import GCP service connector: {e}.")
221
+ try:
222
+ from zenml.integrations.gcp.service_connectors.gcp_service_connector import ( # noqa
223
+ GCPServiceConnector,
224
+ )
225
+ except ImportError as e:
226
+ logger.warning(f"Could not import GCP service connector: {e}.")
222
227
 
223
- try:
224
- from zenml.integrations.azure.service_connectors.azure_service_connector import ( # noqa
225
- AzureServiceConnector,
226
- )
227
- except ImportError as e:
228
- logger.warning(f"Could not import Azure service connector: {e}.")
228
+ try:
229
+ from zenml.integrations.azure.service_connectors.azure_service_connector import ( # noqa
230
+ AzureServiceConnector,
231
+ )
232
+ except ImportError as e:
233
+ logger.warning(
234
+ f"Could not import Azure service connector: {e}."
235
+ )
229
236
 
230
- try:
231
- from zenml.integrations.kubernetes.service_connectors.kubernetes_service_connector import ( # noqa
232
- KubernetesServiceConnector,
233
- )
234
- except ImportError as e:
235
- logger.warning(
236
- f"Could not import Kubernetes service connector: {e}."
237
- )
237
+ try:
238
+ from zenml.integrations.kubernetes.service_connectors.kubernetes_service_connector import ( # noqa
239
+ KubernetesServiceConnector,
240
+ )
241
+ except ImportError as e:
242
+ logger.warning(
243
+ f"Could not import Kubernetes service connector: {e}."
244
+ )
238
245
 
239
- try:
240
- from zenml.service_connectors.docker_service_connector import ( # noqa
241
- DockerServiceConnector,
242
- )
243
- except ImportError as e:
244
- logger.warning(f"Could not import Docker service connector: {e}.")
246
+ try:
247
+ from zenml.service_connectors.docker_service_connector import ( # noqa
248
+ DockerServiceConnector,
249
+ )
250
+ except ImportError as e:
251
+ logger.warning(
252
+ f"Could not import Docker service connector: {e}."
253
+ )
245
254
 
246
- try:
247
- from zenml.integrations.hyperai.service_connectors.hyperai_service_connector import ( # noqa
248
- HyperAIServiceConnector,
249
- )
250
- except ImportError as e:
251
- logger.warning(f"Could not import HyperAI service connector: {e}.")
255
+ try:
256
+ from zenml.integrations.hyperai.service_connectors.hyperai_service_connector import ( # noqa
257
+ HyperAIServiceConnector,
258
+ )
259
+ except ImportError as e:
260
+ logger.warning(
261
+ f"Could not import HyperAI service connector: {e}."
262
+ )
252
263
 
253
264
 
254
265
  service_connector_registry = ServiceConnectorRegistry()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zenml-nightly
3
- Version: 0.70.0.dev20241119
3
+ Version: 0.70.0.dev20241120
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  Home-page: https://zenml.io
6
6
  License: Apache-2.0
@@ -6,7 +6,7 @@ RELEASE_NOTES.md,sha256=DleauURHESDrTrcVzCVLqPiSM9NIAk5vldvEFMc7qlk,389375
6
6
  ROADMAP.md,sha256=hiLSmr16BH8Dfx7SaQM4JcXCGCVl6mFZPFAwJeDTrJU,407
7
7
  SECURITY.md,sha256=9DepA8y03yvCZLHEfcXLTDH4lUyKHquAdukBsccNN7c,682
8
8
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
9
- zenml/VERSION,sha256=RmxPlX0kaYoYYqigOE1L6G416EVE62myhwmKkfCvdCA,19
9
+ zenml/VERSION,sha256=hmQd5okP_IQNYZbqN_n_-p28vX5eUklJ2KovkmOM5Qg,19
10
10
  zenml/__init__.py,sha256=SkMObQA41ajqdZqGErN00S1Vf3KAxpLvbZ-OBy5uYoo,2130
11
11
  zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
12
12
  zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
@@ -705,7 +705,7 @@ zenml/secret/schemas/gcp_secret_schema.py,sha256=tDSxPXlfh4BOSICZjfJjUukfzEyBEgx
705
705
  zenml/service_connectors/__init__.py,sha256=gIBAVUPBZtdO6JtEBCixy9YG4wZRA1mnaxaGAxi3T1Q,645
706
706
  zenml/service_connectors/docker_service_connector.py,sha256=_6WPqYCcSUf8JPakipbkJRvaN2ghhY7zCr38WCHG0SI,13218
707
707
  zenml/service_connectors/service_connector.py,sha256=HW8dTE826ZSD1vWQlqQRm8XYq08v7tDZQ8ORnJ5rTcE,55351
708
- zenml/service_connectors/service_connector_registry.py,sha256=lP0s0k7RIp9WZEW36Q0ygHD5urzF-wUwh41rbXWS5ss,9186
708
+ zenml/service_connectors/service_connector_registry.py,sha256=mCabyKAr7Y6bcAbIFXbir9YrHczDe1ZJ8Bks5bOQouk,9658
709
709
  zenml/service_connectors/service_connector_utils.py,sha256=h3wfVSPO0sQnARVRnih3l8P7LwkCmAgijThuHp2Z53E,18026
710
710
  zenml/services/__init__.py,sha256=8aSLtYlX9EVLB1Se1I4dbhZdTqrjNrAfsn1d_RCc_nk,2800
711
711
  zenml/services/container/__init__.py,sha256=dFHcmlXgNXjUaCR18oGQJ19-I_6f3UeAUURHjqldjTs,668
@@ -1268,8 +1268,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=Bq1djrUP9saoD7vECjS7
1268
1268
  zenml/zen_stores/sql_zen_store.py,sha256=v9aIoBght-Pjivr2OYxvANBOhSqx8cUOzZh0G_oJOnw,404327
1269
1269
  zenml/zen_stores/template_utils.py,sha256=EKYBgmDLTS_PSMWaIO5yvHPLiQvMqHcsAe6NUCrv-i4,9068
1270
1270
  zenml/zen_stores/zen_store_interface.py,sha256=vf2gKBWfUUPtcGZC35oQB6pPNVzWVyQC8nWxVLjfrxM,92692
1271
- zenml_nightly-0.70.0.dev20241119.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1272
- zenml_nightly-0.70.0.dev20241119.dist-info/METADATA,sha256=FeRnTMQEqSj5-Yhqg1aXhzsMCt72lm2v18S6_N4bFeA,21208
1273
- zenml_nightly-0.70.0.dev20241119.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
1274
- zenml_nightly-0.70.0.dev20241119.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1275
- zenml_nightly-0.70.0.dev20241119.dist-info/RECORD,,
1271
+ zenml_nightly-0.70.0.dev20241120.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1272
+ zenml_nightly-0.70.0.dev20241120.dist-info/METADATA,sha256=1ESYfHisI0IYMmkzwGoPrO2mhYcBpka_v3zpzog-Km4,21208
1273
+ zenml_nightly-0.70.0.dev20241120.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
1274
+ zenml_nightly-0.70.0.dev20241120.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1275
+ zenml_nightly-0.70.0.dev20241120.dist-info/RECORD,,