frogml-core 0.0.29__py3-none-any.whl → 0.0.30__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.
- frogml_core/__init__.py +1 -1
 - frogml_core/frogml_client/client.py +11 -1
 - frogml_core/inner/tool/auth.py +6 -11
 - {frogml_core-0.0.29.dist-info → frogml_core-0.0.30.dist-info}/METADATA +2 -2
 - {frogml_core-0.0.29.dist-info → frogml_core-0.0.30.dist-info}/RECORD +6 -6
 - {frogml_core-0.0.29.dist-info → frogml_core-0.0.30.dist-info}/WHEEL +0 -0
 
    
        frogml_core/__init__.py
    CHANGED
    
    
| 
         @@ -4,7 +4,10 @@ from pathlib import Path 
     | 
|
| 
       4 
4 
     | 
    
         
             
            from tempfile import TemporaryDirectory
         
     | 
| 
       5 
5 
     | 
    
         
             
            from typing import TYPE_CHECKING, Dict, List, Optional, Union
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 7 
     | 
    
         
            +
            import requests
         
     | 
| 
      
 8 
     | 
    
         
            +
            from requests import Response
         
     | 
| 
      
 9 
     | 
    
         
            +
            from requests.auth import AuthBase
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
       8 
11 
     | 
    
         
             
            from frogml_core.clients.analytics.client import AnalyticsEngineClient
         
     | 
| 
       9 
12 
     | 
    
         
             
            from frogml_core.clients.automation_management.client import AutomationsManagementClient
         
     | 
| 
       10 
13 
     | 
    
         
             
            from frogml_core.clients.batch_job_management.client import BatchJobManagerClient
         
     | 
| 
         @@ -45,6 +48,7 @@ from frogml_core.frogml_client.projects.project import Project 
     | 
|
| 
       45 
48 
     | 
    
         
             
            from frogml_core.inner.build_config.build_config_v1 import BuildConfigV1
         
     | 
| 
       46 
49 
     | 
    
         
             
            from frogml_core.inner.tool.auth import FrogMLAuthClient
         
     | 
| 
       47 
50 
     | 
    
         
             
            from frogml_core.model.base import BaseModel
         
     | 
| 
      
 51 
     | 
    
         
            +
            from frogml_proto.qwak.build.v1.build_pb2 import DESCRIPTOR
         
     | 
| 
       48 
52 
     | 
    
         | 
| 
       49 
53 
     | 
    
         
             
            if TYPE_CHECKING:
         
     | 
| 
       50 
54 
     | 
    
         
             
                try:
         
     | 
| 
         @@ -888,3 +892,9 @@ class FrogMLClient: 
     | 
|
| 
       888 
892 
     | 
    
         
             
                        Task.from_proto(task)
         
     | 
| 
       889 
893 
     | 
    
         
             
                        for task in model_execution_tasks_proto.batch_job.task_executions
         
     | 
| 
       890 
894 
     | 
    
         
             
                    ]
         
     | 
| 
      
 895 
     | 
    
         
            +
             
     | 
| 
      
 896 
     | 
    
         
            +
                @staticmethod
         
     | 
| 
      
 897 
     | 
    
         
            +
                def download_artifact(download_url: str, timeout: int = 60) -> Response:
         
     | 
| 
      
 898 
     | 
    
         
            +
                    auth: AuthBase = FrogMLClient._get_auth_client().get_auth()
         
     | 
| 
      
 899 
     | 
    
         
            +
             
     | 
| 
      
 900 
     | 
    
         
            +
                    return requests.get(download_url, auth=auth, timeout=timeout)
         
     | 
    
        frogml_core/inner/tool/auth.py
    CHANGED
    
    | 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from typing import  
     | 
| 
      
 1 
     | 
    
         
            +
            from typing import Optional, Union, cast
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            import requests
         
     | 
| 
       4 
4 
     | 
    
         
             
            from frogml_storage._utils import BearerAuth
         
     | 
| 
       5 
5 
     | 
    
         
             
            from frogml_storage.authentication._authentication_utils import get_credentials
         
     | 
| 
       6 
6 
     | 
    
         
             
            from frogml_storage.authentication.models._auth_config import AuthConfig
         
     | 
| 
       7 
     | 
    
         
            -
            from requests.auth import AuthBase 
     | 
| 
      
 7 
     | 
    
         
            +
            from requests.auth import AuthBase
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            from frogml_core.exceptions import FrogmlLoginException
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -35,6 +35,9 @@ class FrogMLAuthClient: 
     | 
|
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
                    self.__get_tenant_id(artifactory_url, auth)
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
      
 38 
     | 
    
         
            +
                def get_auth(self) -> Union[AuthBase]:
         
     | 
| 
      
 39 
     | 
    
         
            +
                    return get_credentials(self.auth_config)[1]
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
       38 
41 
     | 
    
         
             
                def __get_tenant_id(self, artifactory_url: str, auth: AuthBase):
         
     | 
| 
       39 
42 
     | 
    
         
             
                    login_exception = FrogmlLoginException(
         
     | 
| 
       40 
43 
     | 
    
         
             
                        "Failed to authenticate with JFrog. Please check your credentials"
         
     | 
| 
         @@ -48,17 +51,9 @@ class FrogMLAuthClient: 
     | 
|
| 
       48 
51 
     | 
    
         
             
                        base_url = artifactory_url.rstrip("/") + "/ui"
         
     | 
| 
       49 
52 
     | 
    
         | 
| 
       50 
53 
     | 
    
         
             
                    url = f"{base_url}/api/v1/system/auth/screen/footer"
         
     | 
| 
       51 
     | 
    
         
            -
                    kwargs: Dict[str, Union[HTTPBasicAuth, str]] = {}
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                    if isinstance(auth, HTTPBasicAuth):
         
     | 
| 
       54 
     | 
    
         
            -
                        kwargs["auth"] = auth
         
     | 
| 
       55 
     | 
    
         
            -
                    elif isinstance(auth, BearerAuth):
         
     | 
| 
       56 
     | 
    
         
            -
                        kwargs["headers"] = {"Authorization": f"Bearer {auth.token}"}
         
     | 
| 
       57 
     | 
    
         
            -
                    else:
         
     | 
| 
       58 
     | 
    
         
            -
                        raise login_exception
         
     | 
| 
       59 
54 
     | 
    
         | 
| 
       60 
55 
     | 
    
         
             
                    try:
         
     | 
| 
       61 
     | 
    
         
            -
                        response = requests.get(url, timeout= 
     | 
| 
      
 56 
     | 
    
         
            +
                        response = requests.get(url, timeout=15, auth=auth)
         
     | 
| 
       62 
57 
     | 
    
         
             
                        response.raise_for_status()  # Raises an HTTPError for bad responses
         
     | 
| 
       63 
58 
     | 
    
         
             
                        response_data = response.json()
         
     | 
| 
       64 
59 
     | 
    
         | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.3
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: frogml-core
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 0.0. 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 0.0.30
         
     | 
| 
       4 
4 
     | 
    
         
             
            Summary: frogml Core contains the necessary objects and communication tools for using the Jfrog ml Platform
         
     | 
| 
       5 
5 
     | 
    
         
             
            License: Apache-2.0
         
     | 
| 
       6 
6 
     | 
    
         
             
            Keywords: mlops,ml,deployment,serving,model
         
     | 
| 
         @@ -22,7 +22,7 @@ Requires-Dist: cloudpickle (==2.2.1) ; extra == "feature-store" 
     | 
|
| 
       22 
22 
     | 
    
         
             
            Requires-Dist: dacite (==1.8.1)
         
     | 
| 
       23 
23 
     | 
    
         
             
            Requires-Dist: dependency-injector (>=4.0)
         
     | 
| 
       24 
24 
     | 
    
         
             
            Requires-Dist: filelock
         
     | 
| 
       25 
     | 
    
         
            -
            Requires-Dist: frogml-storage (>=0.11. 
     | 
| 
      
 25 
     | 
    
         
            +
            Requires-Dist: frogml-storage (>=0.11.1)
         
     | 
| 
       26 
26 
     | 
    
         
             
            Requires-Dist: grpcio (>=1.57.0)
         
     | 
| 
       27 
27 
     | 
    
         
             
            Requires-Dist: joblib (>=1.3.2,<2.0.0)
         
     | 
| 
       28 
28 
     | 
    
         
             
            Requires-Dist: marshmallow-dataclass (>=8.5.8,<9.0.0)
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            frogml_core/__init__.py,sha256= 
     | 
| 
      
 1 
     | 
    
         
            +
            frogml_core/__init__.py,sha256=N-z0O15f5Q7OMAzH1PwAGJeropiKiOLLZ0tf_J3vtTU,777
         
     | 
| 
       2 
2 
     | 
    
         
             
            frogml_core/automations/__init__.py,sha256=j2gD15MN-xVWhI5rAFsDwhL0CIyICLNT0scXsKvNBkU,1547
         
     | 
| 
       3 
3 
     | 
    
         
             
            frogml_core/automations/automation_executions.py,sha256=xpOb9Dq8gPPGNQDJTvBBZbNz4woZDRZY0HqnLSu7pwU,3230
         
     | 
| 
       4 
4 
     | 
    
         
             
            frogml_core/automations/automations.py,sha256=GKEQyQMi8sxX5oZn62PaxPi0zD8IaJRjBkhczRJxHNs,13070
         
     | 
| 
         @@ -207,7 +207,7 @@ frogml_core/frogml_client/builds/build.py,sha256=5LysOp1nAhjQaL1Jdg-rtb81jOaxZL- 
     | 
|
| 
       207 
207 
     | 
    
         
             
            frogml_core/frogml_client/builds/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       208 
208 
     | 
    
         
             
            frogml_core/frogml_client/builds/filters/metric_filter.py,sha256=hDhyKGavGmZXRbmhGjtZejY1veQR277F1FUgBg-ZjjM,1186
         
     | 
| 
       209 
209 
     | 
    
         
             
            frogml_core/frogml_client/builds/filters/parameter_filter.py,sha256=3qEL2KJdZNytx646XnBjDO7phxCDO98tAUqMurp5Kq0,1098
         
     | 
| 
       210 
     | 
    
         
            -
            frogml_core/frogml_client/client.py,sha256= 
     | 
| 
      
 210 
     | 
    
         
            +
            frogml_core/frogml_client/client.py,sha256=yz56TW4C05O1JTG0JR4VdEsyGwnBH0tMhbzbSsDbr48,30076
         
     | 
| 
       211 
211 
     | 
    
         
             
            frogml_core/frogml_client/data_versioning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       212 
212 
     | 
    
         
             
            frogml_core/frogml_client/data_versioning/data_tag.py,sha256=WadGhSMgKIajVV9jWIIwXhi-xBR5bsQnu9dN-XPX_XU,807
         
     | 
| 
       213 
213 
     | 
    
         
             
            frogml_core/frogml_client/deployments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
         @@ -283,7 +283,7 @@ frogml_core/inner/runtime_di/__init__.py,sha256=HXqtejgH3J9TXjnEBT6cNwnTDPq6v3sT 
     | 
|
| 
       283 
283 
     | 
    
         
             
            frogml_core/inner/runtime_di/containers.py,sha256=LbapepWFjBjkELEOTK7m7AJEfj4KENVDlpD7lv7zw6o,577
         
     | 
| 
       284 
284 
     | 
    
         
             
            frogml_core/inner/singleton_meta.py,sha256=1cU99I0f9tjuMQLMJyLsK1oK3fZJMsO5-TbRHAMXqds,627
         
     | 
| 
       285 
285 
     | 
    
         
             
            frogml_core/inner/tool/__init__.py,sha256=rmOSE-ejnzDG_H7kbikPQxEO4TFIkhBWjOXhTIrldiU,35
         
     | 
| 
       286 
     | 
    
         
            -
            frogml_core/inner/tool/auth.py,sha256= 
     | 
| 
      
 286 
     | 
    
         
            +
            frogml_core/inner/tool/auth.py,sha256=XWBLkCz6xS5xCVH6ZFNC42RnWo1p27w3d2SMbNLMh30,2218
         
     | 
| 
       287 
287 
     | 
    
         
             
            frogml_core/inner/tool/grpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       288 
288 
     | 
    
         
             
            frogml_core/inner/tool/grpc/grpc_auth.py,sha256=WPFWn7CfGp-pSqlnUTplHB6lfuJdzpS6jeidmpyondo,1421
         
     | 
| 
       289 
289 
     | 
    
         
             
            frogml_core/inner/tool/grpc/grpc_tools.py,sha256=8sXDWBd_kVRuwmUSdpQNobylT6u8H_83Q8WlZJYOi0c,7247
         
     | 
| 
         @@ -1019,6 +1019,6 @@ frogml_services_mock/mocks/workspace_manager_service_mock.py,sha256=WbOiWgOyr-xT 
     | 
|
| 
       1019 
1019 
     | 
    
         
             
            frogml_services_mock/services_mock.py,sha256=_34z6rFCHFwcSni-9eyJlrH264xsL_QDNmG-EBv0zMc,20281
         
     | 
| 
       1020 
1020 
     | 
    
         
             
            frogml_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       1021 
1021 
     | 
    
         
             
            frogml_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
         
     | 
| 
       1022 
     | 
    
         
            -
            frogml_core-0.0. 
     | 
| 
       1023 
     | 
    
         
            -
            frogml_core-0.0. 
     | 
| 
       1024 
     | 
    
         
            -
            frogml_core-0.0. 
     | 
| 
      
 1022 
     | 
    
         
            +
            frogml_core-0.0.30.dist-info/METADATA,sha256=pxCcecPVkm0NVHhlzdPbX_alOBKbhwNxP3dyhlLpHUM,2004
         
     | 
| 
      
 1023 
     | 
    
         
            +
            frogml_core-0.0.30.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
         
     | 
| 
      
 1024 
     | 
    
         
            +
            frogml_core-0.0.30.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     |