fiddler-client 3.14.0__tar.gz → 3.15.0__tar.gz
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.
- {fiddler_client-3.14.0/fiddler_client.egg-info → fiddler_client-3.15.0}/PKG-INFO +1 -1
- fiddler_client-3.15.0/fiddler/VERSION +1 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/exceptions.py +146 -140
- {fiddler_client-3.14.0 → fiddler_client-3.15.0/fiddler_client.egg-info}/PKG-INFO +1 -1
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/pyproject.toml +5 -5
- fiddler_client-3.14.0/fiddler/VERSION +0 -1
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/LICENSE.txt +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/PUBLIC.md +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/README.md +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/configs.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/connection.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/alert_rule.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/baseline.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/common.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/dataset.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/events.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/job.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/model_deployment.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/constants/xai.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/decorators.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/alert_record.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/alert_rule.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/base.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/baseline.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/custom_expression.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/dataset.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/events.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/file.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/job.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/model_artifact.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/model_deployment.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/organization.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/project.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/surrogate.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/user.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/webhook.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/entities/xai.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/libs/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/libs/aws.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/libs/http_client.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/libs/json_encoder.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/libs/semver.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/gem.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/keras_ig_helpers.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/project_attributions_helpers.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/template_model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/alert_record.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/alert_rule.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/base.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/baseline.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/custom_expression.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/custom_features.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/dataset.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/events.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/file.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/filter_query.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/job.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/model_deployment.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/model_schema.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/model_spec.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/model_task_params.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/organization.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/project.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/response.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/server_info.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/user.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/webhook.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/xai.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/schemas/xai_params.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_alert_record.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_alert_rule.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_baseline.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_custom_metric.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_dataset.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_events.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_files.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_generate_model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_job.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_mixin.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_artifact.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_deployment.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_surrogate.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_project.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_segment.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_webhook.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/apis/test_xai.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/artifact_test_dir/package.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/conftest.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/constants.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_connection.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_http_client_redaction.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_json_encoder.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_logger.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_sagemaker_auth.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/test_utils.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/tests/utils.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/__init__.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/column_generator.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/decorators.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/helpers.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/logger.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/model_generator.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/validations.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/utils/version.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/version.py +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler_client.egg-info/SOURCES.txt +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler_client.egg-info/dependency_links.txt +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler_client.egg-info/requires.txt +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler_client.egg-info/top_level.txt +0 -0
- {fiddler_client-3.14.0 → fiddler_client-3.15.0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.15.0
|
|
@@ -16,6 +16,12 @@ class BaseError(Exception):
|
|
|
16
16
|
library. It provides common functionality for error handling, message
|
|
17
17
|
formatting, and error identification.
|
|
18
18
|
|
|
19
|
+
``BaseError`` is not exported from the top-level ``fiddler`` package;
|
|
20
|
+
import it from ``fiddler.exceptions``. The client also raises a plain
|
|
21
|
+
``BaseError`` when it gives up retrying a request (timeouts, connection
|
|
22
|
+
failures, HTTP 429, and most 5xx responses); the message says how many
|
|
23
|
+
attempts were made.
|
|
24
|
+
|
|
19
25
|
Attributes:
|
|
20
26
|
message: Human-readable error message describing the issue
|
|
21
27
|
name: Name of the specific error type (class name)
|
|
@@ -23,11 +29,14 @@ class BaseError(Exception):
|
|
|
23
29
|
Examples:
|
|
24
30
|
Catching any Fiddler-specific error:
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
.. code-block:: python
|
|
33
|
+
|
|
34
|
+
from fiddler.exceptions import BaseError
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
project = fdl.Project.from_name(name="my-project")
|
|
38
|
+
except BaseError as e:
|
|
39
|
+
print(f"Fiddler error occurred: {e.name} - {e.message}")
|
|
31
40
|
"""
|
|
32
41
|
message: str = 'Something went wrong'
|
|
33
42
|
|
|
@@ -55,7 +64,9 @@ class IncompatibleClient(BaseError): # noqa: N818
|
|
|
55
64
|
behavior or missing functionality.
|
|
56
65
|
|
|
57
66
|
The exception includes both the client version and server version in the error
|
|
58
|
-
message to help users understand what versions are involved in the incompatibility
|
|
67
|
+
message to help users understand what versions are involved in the incompatibility,
|
|
68
|
+
for example: *Python Client version (3.8.0) is not compatible with your
|
|
69
|
+
Fiddler Platform version (3.5.0).*
|
|
59
70
|
|
|
60
71
|
Attributes:
|
|
61
72
|
message: Formatted message showing both client and server versions
|
|
@@ -63,15 +74,13 @@ class IncompatibleClient(BaseError): # noqa: N818
|
|
|
63
74
|
Examples:
|
|
64
75
|
Handling version incompatibility:
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
fdl.init(url="https://old-fiddler.com", token="token")
|
|
68
|
-
except IncompatibleClient as e:
|
|
69
|
-
print(f"Version mismatch: {e.message}")
|
|
70
|
-
# Upgrade client or contact administrator
|
|
77
|
+
.. code-block:: python
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
try:
|
|
80
|
+
fdl.init(url="https://old-fiddler.example.com", token="token")
|
|
81
|
+
except fdl.IncompatibleClient as e:
|
|
82
|
+
print(f"Version mismatch: {e.message}")
|
|
83
|
+
# Upgrade the client or contact your administrator
|
|
75
84
|
"""
|
|
76
85
|
|
|
77
86
|
message = (
|
|
@@ -102,52 +111,42 @@ class AsyncJobFailed(BaseError): # noqa: N818
|
|
|
102
111
|
Examples:
|
|
103
112
|
Handling async job failures:
|
|
104
113
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
job.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
job = model.upload_artifact(artifact_path)
|
|
115
|
-
while not job.is_complete():
|
|
116
|
-
if job.status == JobStatus.FAILED:
|
|
117
|
-
print(f"Job failed: {job.error_message}")
|
|
118
|
-
break
|
|
119
|
-
time.sleep(5)
|
|
114
|
+
.. code-block:: python
|
|
115
|
+
|
|
116
|
+
job = model.add_artifact(model_dir="model_package/")
|
|
117
|
+
try:
|
|
118
|
+
job.wait() # Raises AsyncJobFailed if the job fails
|
|
119
|
+
except fdl.AsyncJobFailed as e:
|
|
120
|
+
print(f"Job failed: {e.message}")
|
|
121
|
+
# Check the job details or retry the operation
|
|
120
122
|
"""
|
|
121
123
|
|
|
122
124
|
|
|
123
125
|
class Unsupported(BaseError): # noqa: N818
|
|
124
126
|
"""Raised when an unsupported operation is attempted.
|
|
125
127
|
|
|
126
|
-
This exception occurs when
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
This exception occurs when you call a client method that has been retired,
|
|
129
|
+
or when the Fiddler platform rejects a request with HTTP 405
|
|
130
|
+
(Method Not Allowed).
|
|
131
|
+
|
|
132
|
+
Common unsupported scenarios:
|
|
130
133
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
operations incompatible with the model's configuration.
|
|
134
|
+
- Calling a method retired in an earlier client version
|
|
135
|
+
- An operation the platform rejects with HTTP 405 (Method Not Allowed)
|
|
134
136
|
|
|
135
137
|
Attributes:
|
|
136
138
|
message: Description of the unsupported operation
|
|
137
139
|
|
|
138
140
|
Examples:
|
|
139
|
-
Handling
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- Using enterprise features on basic plans
|
|
149
|
-
- Attempting operations on incompatible model types
|
|
150
|
-
- Calling deprecated API methods
|
|
141
|
+
Handling a method that is no longer supported:
|
|
142
|
+
|
|
143
|
+
.. code-block:: python
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
df = model.get_slice(query="SELECT * FROM my_table")
|
|
147
|
+
except fdl.Unsupported as e:
|
|
148
|
+
print(f"Not supported: {e.message}")
|
|
149
|
+
# The message names the replacement, e.g. model.download_data
|
|
151
150
|
"""
|
|
152
151
|
|
|
153
152
|
message = 'This operation is not supported'
|
|
@@ -156,23 +155,26 @@ class Unsupported(BaseError): # noqa: N818
|
|
|
156
155
|
class HttpError(BaseError):
|
|
157
156
|
"""Base class for all HTTP-related errors.
|
|
158
157
|
|
|
159
|
-
This is the parent class
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
This is the parent class of :class:`ApiError` (and so of
|
|
159
|
+
:class:`NotFound` and :class:`Conflict`). It is also raised directly when
|
|
160
|
+
an API response body is not valid JSON (message starting
|
|
161
|
+
``Invalid JSON response``).
|
|
163
162
|
|
|
164
163
|
Note:
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
Catching ``HttpError`` does not catch every failed request: HTTP 405
|
|
165
|
+
is raised as :class:`Unsupported`, an error response without a
|
|
166
|
+
structured body is re-raised as ``requests.HTTPError``, and a request
|
|
167
|
+
the client gave up retrying ends in a plain ``BaseError``.
|
|
167
168
|
|
|
168
169
|
Examples:
|
|
169
|
-
Catching
|
|
170
|
+
Catching Fiddler API errors and invalid JSON responses:
|
|
171
|
+
|
|
172
|
+
.. code-block:: python
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
print(f"HTTP error: {e.message}")
|
|
174
|
+
try:
|
|
175
|
+
project = fdl.Project.from_name(name="my-project")
|
|
176
|
+
except fdl.HttpError as e:
|
|
177
|
+
print(f"HTTP error: {e.message}")
|
|
176
178
|
"""
|
|
177
179
|
|
|
178
180
|
|
|
@@ -185,22 +187,25 @@ class ConnTimeout(HttpError): # noqa: N818
|
|
|
185
187
|
configured timeout period.
|
|
186
188
|
|
|
187
189
|
Note:
|
|
188
|
-
This class is deprecated and not thrown anymore
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
This class is deprecated and not thrown anymore, so
|
|
191
|
+
``except fdl.ConnTimeout`` never fires. A timed-out request is retried,
|
|
192
|
+
and when the client gives up it raises a plain ``BaseError``; catch
|
|
193
|
+
that instead, and raise the timeout in ``fdl.init()`` if needed.
|
|
191
194
|
|
|
192
195
|
Attributes:
|
|
193
196
|
message: Timeout-specific error message
|
|
194
197
|
|
|
195
198
|
Examples:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
Catching a request that failed after retries:
|
|
200
|
+
|
|
201
|
+
.. code-block:: python
|
|
202
|
+
|
|
203
|
+
from fiddler.exceptions import BaseError
|
|
204
|
+
|
|
205
|
+
try:
|
|
206
|
+
project = fdl.Project.from_name(name="my-project")
|
|
207
|
+
except BaseError as e:
|
|
208
|
+
print(f"Request failed after retries: {e.message}")
|
|
204
209
|
"""
|
|
205
210
|
|
|
206
211
|
message = 'Request timed out while trying to reach endpoint'
|
|
@@ -214,22 +219,25 @@ class ConnError(HttpError):
|
|
|
214
219
|
unreachability, DNS resolution failures, or connection refused errors.
|
|
215
220
|
|
|
216
221
|
Note:
|
|
217
|
-
This class is deprecated and not thrown anymore
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
This class is deprecated and not thrown anymore, so
|
|
223
|
+
``except fdl.ConnError`` never fires. A failed connection (for example
|
|
224
|
+
a DNS error or a refused connection) is retried, and when the client
|
|
225
|
+
gives up it raises a plain ``BaseError``; catch that instead.
|
|
220
226
|
|
|
221
227
|
Attributes:
|
|
222
228
|
message: Connection-specific error message
|
|
223
229
|
|
|
224
230
|
Examples:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
Catching a request that failed after retries:
|
|
232
|
+
|
|
233
|
+
.. code-block:: python
|
|
234
|
+
|
|
235
|
+
from fiddler.exceptions import BaseError
|
|
236
|
+
|
|
237
|
+
try:
|
|
238
|
+
project = fdl.Project.from_name(name="my-project")
|
|
239
|
+
except BaseError as e:
|
|
240
|
+
print(f"Request failed after retries: {e.message}")
|
|
233
241
|
"""
|
|
234
242
|
|
|
235
243
|
message = 'Unable to reach the given endpoint'
|
|
@@ -248,6 +256,9 @@ class ApiError(HttpError):
|
|
|
248
256
|
NotFound and Conflict, but can also be raised directly for other
|
|
249
257
|
HTTP error status codes.
|
|
250
258
|
|
|
259
|
+
You won't see HTTP 429 or most 5xx codes here: the client retries those
|
|
260
|
+
itself and, when it gives up, raises a plain ``BaseError`` instead.
|
|
261
|
+
|
|
251
262
|
Attributes:
|
|
252
263
|
code: HTTP status code returned by the API
|
|
253
264
|
message: Error message from the API response
|
|
@@ -257,26 +268,26 @@ class ApiError(HttpError):
|
|
|
257
268
|
Examples:
|
|
258
269
|
Handling general API errors:
|
|
259
270
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
print(f"
|
|
271
|
+
.. code-block:: python
|
|
272
|
+
|
|
273
|
+
try:
|
|
274
|
+
model = fdl.Model.from_name(name="my-model", project_id=project.id)
|
|
275
|
+
except fdl.ApiError as e:
|
|
276
|
+
print(f"API Error {e.code}: {e.message}")
|
|
277
|
+
if e.errors:
|
|
278
|
+
print(f"Details: {e.errors}")
|
|
266
279
|
|
|
267
280
|
Handling specific status codes:
|
|
268
281
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
else:
|
|
279
|
-
print(f"Client error: {e.message}")
|
|
282
|
+
.. code-block:: python
|
|
283
|
+
|
|
284
|
+
try:
|
|
285
|
+
model = fdl.Model.from_name(name="my-model", project_id=project.id)
|
|
286
|
+
except fdl.ApiError as e:
|
|
287
|
+
if e.code in (401, 403):
|
|
288
|
+
print("Check your token and its permissions")
|
|
289
|
+
else:
|
|
290
|
+
print(f"API error {e.code}: {e.message}")
|
|
280
291
|
"""
|
|
281
292
|
|
|
282
293
|
code: int = HTTPStatus.INTERNAL_SERVER_ERROR
|
|
@@ -299,8 +310,11 @@ class NotFound(ApiError): # noqa: N818
|
|
|
299
310
|
projects, datasets, alerts, or any other entity that cannot be located
|
|
300
311
|
using the provided identifier.
|
|
301
312
|
|
|
302
|
-
Common scenarios
|
|
303
|
-
|
|
313
|
+
Common NotFound scenarios:
|
|
314
|
+
|
|
315
|
+
- Accessing models, projects, or datasets with wrong IDs
|
|
316
|
+
- Referencing deleted or expired resources
|
|
317
|
+
- Typos in resource names or identifiers
|
|
304
318
|
|
|
305
319
|
Attributes:
|
|
306
320
|
code: Always set to 404 (HTTP_NOT_FOUND)
|
|
@@ -310,25 +324,26 @@ class NotFound(ApiError): # noqa: N818
|
|
|
310
324
|
Examples:
|
|
311
325
|
Handling missing resources:
|
|
312
326
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
327
|
+
.. code-block:: python
|
|
328
|
+
|
|
329
|
+
try:
|
|
330
|
+
model = fdl.Model.from_name(name="wrong-model-name", project_id=project.id)
|
|
331
|
+
except fdl.NotFound as e:
|
|
332
|
+
print(f"Model not found: {e.message}")
|
|
333
|
+
# Create the model or check the name
|
|
318
334
|
|
|
319
335
|
Checking if a resource exists:
|
|
320
336
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
- Typos in resource names or identifiers
|
|
337
|
+
.. code-block:: python
|
|
338
|
+
|
|
339
|
+
try:
|
|
340
|
+
project = fdl.Project.from_name(name="my-project")
|
|
341
|
+
print("Project exists")
|
|
342
|
+
except fdl.NotFound:
|
|
343
|
+
print("Project doesn't exist, creating it...")
|
|
344
|
+
project = fdl.Project(name="my-project").create()
|
|
345
|
+
|
|
346
|
+
# fdl.Project.get_or_create(name="my-project") does both in one call
|
|
332
347
|
"""
|
|
333
348
|
code: int = HTTPStatus.NOT_FOUND
|
|
334
349
|
"""HTTP status code; always ``404`` (``HTTPStatus.NOT_FOUND``)."""
|
|
@@ -344,9 +359,12 @@ class Conflict(ApiError): # noqa: N818
|
|
|
344
359
|
create resources that already exist, or when concurrent modifications cause
|
|
345
360
|
state conflicts.
|
|
346
361
|
|
|
347
|
-
Common scenarios
|
|
348
|
-
|
|
349
|
-
|
|
362
|
+
Common Conflict scenarios:
|
|
363
|
+
|
|
364
|
+
- Creating resources with duplicate names
|
|
365
|
+
- Modifying resources during processing
|
|
366
|
+
- Violating business logic constraints
|
|
367
|
+
- Concurrent modification conflicts
|
|
350
368
|
|
|
351
369
|
Attributes:
|
|
352
370
|
code: Always set to 409 (HTTP_CONFLICT)
|
|
@@ -356,26 +374,14 @@ class Conflict(ApiError): # noqa: N818
|
|
|
356
374
|
Examples:
|
|
357
375
|
Handling resource conflicts:
|
|
358
376
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
try:
|
|
369
|
-
model.update_status("active")
|
|
370
|
-
except Conflict as e:
|
|
371
|
-
print(f"Cannot change status: {e.message}")
|
|
372
|
-
# Wait for current operation to complete
|
|
373
|
-
|
|
374
|
-
Common Conflict scenarios:
|
|
375
|
-
- Creating resources with duplicate names
|
|
376
|
-
- Modifying resources during processing
|
|
377
|
-
- Violating business logic constraints
|
|
378
|
-
- Concurrent modification conflicts
|
|
377
|
+
.. code-block:: python
|
|
378
|
+
|
|
379
|
+
try:
|
|
380
|
+
project = fdl.Project(name="existing-project").create()
|
|
381
|
+
except fdl.Conflict as e:
|
|
382
|
+
print(f"Project already exists: {e.message}")
|
|
383
|
+
# Use the existing project or choose a different name
|
|
384
|
+
project = fdl.Project.from_name(name="existing-project")
|
|
379
385
|
"""
|
|
380
386
|
code: int = HTTPStatus.CONFLICT
|
|
381
387
|
"""HTTP status code; always ``409`` (``HTTPStatus.CONFLICT``)."""
|
|
@@ -48,13 +48,13 @@ fiddler = ["VERSION"]
|
|
|
48
48
|
[dependency-groups]
|
|
49
49
|
dev = [
|
|
50
50
|
"deepdiff==9.1.0",
|
|
51
|
-
"flake8==7.
|
|
52
|
-
"flake8-bugbear==
|
|
51
|
+
"flake8==7.4.1",
|
|
52
|
+
"flake8-bugbear==26.9.30",
|
|
53
53
|
"flake8-builtins==3.1.0",
|
|
54
54
|
"flake8-eradicate==1.5.0",
|
|
55
|
-
"mypy==
|
|
55
|
+
"mypy==2.3.0",
|
|
56
56
|
"mypy-extensions==1.1.0",
|
|
57
|
-
"pylint==4.
|
|
57
|
+
"pylint==4.1.1",
|
|
58
58
|
"pylint-pydantic==0.4.1",
|
|
59
59
|
"pytest==9.1.1",
|
|
60
60
|
"pytest-cov==7.1.0",
|
|
@@ -62,7 +62,7 @@ dev = [
|
|
|
62
62
|
"python-decouple==3.8",
|
|
63
63
|
"responses==0.26.3",
|
|
64
64
|
"types-PyYAML",
|
|
65
|
-
"types-requests==2.33.0.
|
|
65
|
+
"types-requests==2.33.0.20260906",
|
|
66
66
|
"types-simplejson==4.1.0.20260724",
|
|
67
67
|
"ruff",
|
|
68
68
|
"twine",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.14.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler/packtools/project_attributions_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fiddler_client-3.14.0 → fiddler_client-3.15.0}/fiddler_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|