proxyml 0.1.0__tar.gz → 0.1.1__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.
- {proxyml-0.1.0 → proxyml-0.1.1}/PKG-INFO +1 -1
- {proxyml-0.1.0 → proxyml-0.1.1}/pyproject.toml +1 -1
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml/__init__.py +1 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml/client.py +22 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml.egg-info/PKG-INFO +1 -1
- {proxyml-0.1.0 → proxyml-0.1.1}/LICENSE +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/README.md +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/setup.cfg +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml/schema.py +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml.egg-info/SOURCES.txt +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml.egg-info/dependency_links.txt +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml.egg-info/requires.txt +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/src/proxyml.egg-info/top_level.txt +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/tests/test_client.py +0 -0
- {proxyml-0.1.0 → proxyml-0.1.1}/tests/test_schema.py +0 -0
|
@@ -44,6 +44,15 @@ def put(endpoint: str, payload: dict) -> requests.models.Response:
|
|
|
44
44
|
return r
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
def get(endpoint: str, params: dict) -> requests.models.Response:
|
|
48
|
+
r = requests.get(
|
|
49
|
+
url=f'{PROXYML_BASE_URL}{endpoint}',
|
|
50
|
+
headers=_headers(),
|
|
51
|
+
params=params
|
|
52
|
+
)
|
|
53
|
+
return r
|
|
54
|
+
|
|
55
|
+
|
|
47
56
|
def put_schema(schema: dict):
|
|
48
57
|
r = put(endpoint='/schema', payload=schema)
|
|
49
58
|
if r.status_code == 200:
|
|
@@ -188,3 +197,16 @@ def interpret_counterfactual(
|
|
|
188
197
|
f"This may indicate the surrogate model does not fully capture "
|
|
189
198
|
f"the original model's decision boundary in this region."
|
|
190
199
|
)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def get_feature_importances(version: int | None = None, ):
|
|
203
|
+
params = {'version': version} if version else {}
|
|
204
|
+
r = get(endpoint='/explain/importance', params=params)
|
|
205
|
+
if r.status_code == 200:
|
|
206
|
+
return r.json()
|
|
207
|
+
logger.error(
|
|
208
|
+
"Feature importances failed with status %s: %s",
|
|
209
|
+
r.status_code,
|
|
210
|
+
r.text,
|
|
211
|
+
)
|
|
212
|
+
return None
|
|
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
|