qwak-core 0.4.263__py3-none-any.whl → 0.4.265__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.
qwak/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """Top-level package for qwak-core."""
2
2
 
3
3
  __author__ = "Qwak.ai"
4
- __version__ = "0.4.263"
4
+ __version__ = "0.4.265"
5
5
 
6
6
  from qwak.inner.di_configuration import wire_dependencies
7
7
  from qwak.model.experiment_tracking import log_metric, log_param
qwak/inner/tool/auth.py CHANGED
@@ -162,30 +162,43 @@ class FrogMLAuthClient(BaseAuthClient):
162
162
 
163
163
  # Remove '/artifactory/' from the URL
164
164
  if "/artifactory" in artifactory_url:
165
- base_url = artifactory_url.replace("/artifactory", "/ui")
165
+ base_url = artifactory_url.replace("/artifactory", "")
166
166
  else:
167
- # Remove trailing slash if it exists and append /ui
168
- base_url = artifactory_url.rstrip("/") + "/ui"
167
+ # Remove trailing slash if exists
168
+ base_url = artifactory_url.rstrip("/")
169
169
  try:
170
170
  response = requests.get(
171
- f"{base_url}/api/v1/system/auth/screen/footer",
171
+ f"{base_url}/ui/api/v1/system/auth/screen/footer",
172
172
  headers={"Authorization": f"Bearer {self._token}"},
173
173
  timeout=60,
174
174
  )
175
175
  response.raise_for_status() # Raises an HTTPError for bad responses
176
176
  response_data = response.json()
177
177
  if "serverId" not in response_data:
178
- raise QwakLoginException(
179
- "Failed to authenticate with JFrog. Please check your credentials"
178
+ response = requests.get(
179
+ f"{base_url}/jfconnect/api/v1/system/jpd_id",
180
+ headers={"Authorization": f"Bearer {self._token}"},
181
+ timeout=60,
180
182
  )
181
- self._tenant_id = response_data["serverId"]
183
+ if response.status_code == 200:
184
+ self._tenant_id = response.text
185
+ elif response.status_code == 401:
186
+ raise QwakLoginException(
187
+ "Failed to authenticate with JFrog. Please check your credentials"
188
+ )
189
+ else:
190
+ raise QwakLoginException(
191
+ "Failed to authenticate with JFrog. Please check your artifactory configuration"
192
+ )
193
+ else:
194
+ self._tenant_id = response_data["serverId"]
182
195
  except requests.exceptions.RequestException:
183
196
  raise QwakLoginException(
184
- "Failed to authenticate with JFrog. Please check your credentials"
197
+ "Failed to authenticate with JFrog. Please check your artifactory configuration"
185
198
  )
186
199
  except ValueError: # This catches JSON decode errors
187
200
  raise QwakLoginException(
188
- "Failed to authenticate with JFrog. Please check your credentials"
201
+ "Failed to authenticate with JFrog. Please check your artifactory configuration"
189
202
  )
190
203
 
191
204
  def __validate_token(self: Self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qwak-core
3
- Version: 0.4.263
3
+ Version: 0.4.265
4
4
  Summary: Qwak Core contains the necessary objects and communication tools for using the Qwak Platform
5
5
  License: Apache-2.0
6
6
  Keywords: mlops,ml,deployment,serving,model
@@ -591,7 +591,7 @@ _qwak_proto/qwak/workspace/workspace_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
591
591
  _qwak_proto/qwak/workspace/workspace_service_pb2.py,sha256=AB3C9S_AbOD7Nx1Ni4j1rW6PNtYTV1zjiqFQk-goQ74,21429
592
592
  _qwak_proto/qwak/workspace/workspace_service_pb2.pyi,sha256=nKKCHwnovZhsy8TSVmdz-Vtl0nviOOoX56HD-41Xo08,13726
593
593
  _qwak_proto/qwak/workspace/workspace_service_pb2_grpc.py,sha256=yKGuexxTBza99Ihe0DSTniV2ZSd_AG47inHenqfi890,27193
594
- qwak/__init__.py,sha256=5lTj2jxOj9xZZo9GlFEFeA9yXjIwcejs_AWFmmxsSQg,587
594
+ qwak/__init__.py,sha256=oEXIef8SYmHpEkzNYJlqLwZQhLP7dO5RDFRg63cz7NU,587
595
595
  qwak/automations/__init__.py,sha256=qFZRvCxUUn8gcxkJR0v19ulHW2oJ0x6-Rif7HiheDP4,1522
596
596
  qwak/automations/automation_executions.py,sha256=5MeH_epYYWb8NKXgAozwT_jPyyUDednBHG7izloi7RY,3228
597
597
  qwak/automations/automations.py,sha256=3yx8e2v0uSKDnXbqyknasyEoQ5vxGni6K40Hbi1_zkk,12599
@@ -846,7 +846,7 @@ qwak/inner/runtime_di/__init__.py,sha256=ylaHwo2Hlq3pmeziA0Ip87DMnkcuBffKKi0tTH7
846
846
  qwak/inner/runtime_di/containers.py,sha256=-AREM-IUAd9JhrhQablqixxpj4L9Tk1iQkK1fA5YbrA,545
847
847
  qwak/inner/singleton_meta.py,sha256=1cU99I0f9tjuMQLMJyLsK1oK3fZJMsO5-TbRHAMXqds,627
848
848
  qwak/inner/tool/__init__.py,sha256=DDoMZk7LIZNfu63Ft0mLE5wflwlQoghAJ1ZmMAcAeVE,74
849
- qwak/inner/tool/auth.py,sha256=nCDtphlFkwgIrVewSrI9p1vh-63rB-cARXFtVl8XHcY,6878
849
+ qwak/inner/tool/auth.py,sha256=yw4XgIviPQ83hslb5T3T0AoosuOOEdRmlZoFvg79oPA,7488
850
850
  qwak/inner/tool/grpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
851
851
  qwak/inner/tool/grpc/grpc_auth.py,sha256=nHfIk2R5ljCvU8hsgk_X6grfNhVrbTvQe6uJffe5W5o,2291
852
852
  qwak/inner/tool/grpc/grpc_tools.py,sha256=ArtsEZz5V-YxOVE6vH_UHJwOn6gAJVIolda8hF6qwMs,7256
@@ -1065,6 +1065,6 @@ qwak_services_mock/mocks/workspace_manager_service_mock.py,sha256=O9ZSwln4T4kHVk
1065
1065
  qwak_services_mock/services_mock.py,sha256=zXtHcX8a_acz7ynxuCBxxVpHpde7aAGjIn6Uw52LY1s,19593
1066
1066
  qwak_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1067
1067
  qwak_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
1068
- qwak_core-0.4.263.dist-info/METADATA,sha256=oQm0FzIU-JoPixijawlSYeoF8Gqm-cMDv0mTk65LFX8,2549
1069
- qwak_core-0.4.263.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1070
- qwak_core-0.4.263.dist-info/RECORD,,
1068
+ qwak_core-0.4.265.dist-info/METADATA,sha256=blC1g0Tev51fN_pJJvqS6Kt_XMWx_k8hnP1pCLxbo0I,2549
1069
+ qwak_core-0.4.265.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1070
+ qwak_core-0.4.265.dist-info/RECORD,,