proxyml 0.1.1__tar.gz → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxyml
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for calling the ProxyML API
5
5
  Author-email: ProxyML <contact@proxyml.ai>
6
6
  License: Apache License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "proxyml"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Python SDK for calling the ProxyML API"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -136,10 +136,10 @@ def predict(samples: list, version: int | None): # Defaults to latest version i
136
136
  def find_counterfactual(sample, target, n_neighbors: int = 10000, perturbation_scale: float = 0.1, version: int | None = None, as_df: bool = True):
137
137
  payload = {
138
138
  'instance': sample,
139
- 'target_label': target,
139
+ 'target_label': target.item() if hasattr(target, 'item') else target, # handle numpy scalars
140
140
  'n_neighbors': n_neighbors,
141
141
  'perturbation_scale': perturbation_scale,
142
- }
142
+ }
143
143
  if version: # Also rejects version 0 (versions start at 1)
144
144
  payload['version'] = version
145
145
  r = post(endpoint='/explain/counterfactual', payload=payload)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxyml
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for calling the ProxyML API
5
5
  Author-email: ProxyML <contact@proxyml.ai>
6
6
  License: Apache License
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes