agentx-python 0.8.5__py3-none-any.whl → 0.8.6__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.
@@ -227,6 +227,12 @@ class EvaluationsClient:
227
227
  data = self._request("POST", "/datasets", json=self._with_workspace(payload))
228
228
  return Dataset(**data)
229
229
 
230
+ def delete_dataset(self, dataset_id: str) -> None:
231
+ """Deletes the dataset, its grading config, and both version histories. Past runs are
232
+ kept (their dataset reference degrades to a bare id). The engine refuses (409) when the
233
+ dataset's config is attached to a live scorer."""
234
+ self._request("DELETE", f"/datasets/{dataset_id}")
235
+
230
236
  def list_datasets(self) -> List[Dataset]:
231
237
  data = self._request("GET", "/datasets", params=self._workspace_params())
232
238
  return [
@@ -333,6 +333,37 @@ class DatasetClient:
333
333
  def list(self) -> List[Dataset]:
334
334
  return self._client.list_datasets()
335
335
 
336
+ def delete(self, dataset_id: str) -> None:
337
+ """Delete a dataset (and its grading config + version histories; past runs are kept)."""
338
+ self._client.delete_dataset(dataset_id)
339
+
340
+ def import_dataset(self, source: Any, name: Optional[str] = None) -> Dataset:
341
+ """Create a NEW dataset from an exported/fetched one (a ``Dataset`` from ``get()``, or
342
+ the engine's wire/NDJSON-export dict). Always a copy with a fresh id - never a
343
+ restore-in-place. ``name`` optionally renames the copy."""
344
+ wire: Dict[str, Any] = (
345
+ source.model_dump(by_alias=True) if hasattr(source, "model_dump") else dict(source)
346
+ )
347
+ payload: Dict[str, Any] = {
348
+ "name": name or wire.get("name") or "Imported dataset",
349
+ "questions": wire.get("questions") or [],
350
+ }
351
+ for key in (
352
+ "description",
353
+ "numberOfRequests",
354
+ "acceptanceCriteria",
355
+ "rejectionCriteria",
356
+ "evaluationCriteria",
357
+ "vectorSimilarity",
358
+ "jaccardSimilarity",
359
+ "bleuScore",
360
+ "rougeScore",
361
+ "codeScorers",
362
+ ):
363
+ if wire.get(key) is not None:
364
+ payload[key] = wire[key]
365
+ return self._client.create_dataset(payload)
366
+
336
367
 
337
368
  # ---------------------------------------------------------------------------
338
369
  # Helpers
@@ -415,6 +415,11 @@ class RunResultRow(BaseModel):
415
415
 
416
416
  rating: Optional[float] = None
417
417
  justification: Optional[str] = None
418
+ # scored | skipped (the judge could not score this row) | failed (the submitted result
419
+ # carried an error). A skipped row has rating None - a fact about the judge, not a 0.
420
+ status: Optional[str] = None
421
+ question_index: Optional[int] = Field(default=None, alias="questionIndex")
422
+ run_number: Optional[int] = Field(default=None, alias="runNumber")
418
423
  question_text: Optional[str] = Field(default=None, alias="questionText")
419
424
  response: Optional[str] = None
420
425
  trace_id: Optional[str] = Field(default=None, alias="traceId")
agentx/version.py CHANGED
@@ -1 +1 @@
1
- VERSION = "0.8.5"
1
+ VERSION = "0.8.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-python
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: Official Python SDK for AgentX (https://www.agentx.so/)
5
5
  Home-page: https://github.com/AgentX-ai/AgentX-python
6
6
  Author: Robin Wang and AgentX Team
@@ -10,13 +10,13 @@ agentx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  agentx/testing.py,sha256=0shZEid_vhJgBegpO_loUq6APYDxQrUgD3jvcRdIDV8,7372
11
11
  agentx/traces.py,sha256=sz9gxutlDKNgf0fdCkyzKsGwK5eMAJuIEl3NIwGrsuo,2287
12
12
  agentx/util.py,sha256=lt2Kpg4Fj8whrSuAhLEahcPEIYRVpK9RCC5y9ShdTJs,703
13
- agentx/version.py,sha256=EG17K_2R-skew5or95Q31PUAkXCElZYytsIaAs13hLI,18
13
+ agentx/version.py,sha256=hmHiHLKwWDl96GTl8BU-lEqkwGqsS8wHvMMNnaUkHZc,18
14
14
  agentx/evaluations/__init__.py,sha256=Erv7RGFlRxGTG4rVb2uHhCqLLEX_iAWKqkZKzK6CumE,262
15
15
  agentx/evaluations/_term.py,sha256=WFpiNzdgDBeJJ-Gg-6X7TwwxllobuE4OqFUTuDQvS3Y,2529
16
- agentx/evaluations/client.py,sha256=MjSBoCXDZPlNHLvlPg4Q5veTIMauU7E7SMtBONqczQk,30876
17
- agentx/evaluations/datasets.py,sha256=7l-Isy4e7Ud9l37vWSkZSnTh3wnRMdAk0sFKnVTBv1Y,14751
16
+ agentx/evaluations/client.py,sha256=miUmEq4IthUDl-QVAczqT7iaOu4X6QMbHhlm2rSSJpg,31239
17
+ agentx/evaluations/datasets.py,sha256=2--V40JrSJoXxR1s0jI3i5rYT8ys25ouijqQQlj72D8,16053
18
18
  agentx/evaluations/evaluation_settings.py,sha256=geRydHqKpxwkxBVfMIOqkB6NlStyOZrYwZnMHluDwvA,6276
19
- agentx/evaluations/models.py,sha256=4z1efp6mNdIVBtm95Lelbn0zugtfLXXCnrYD3j9KjZ4,31902
19
+ agentx/evaluations/models.py,sha256=fKaDwyXhruXRHpBDw89Vv_FeceLvSILVrA9HNtzKLF8,32266
20
20
  agentx/evaluations/prompts.py,sha256=8xyvMpAl3mD5xuSZozuaohdnCBWe5Q02RldwiPLUO20,3493
21
21
  agentx/evaluations/reporting.py,sha256=GtNnL-1eNEQrSqd0yrHi5mGqC9_u0kUAN8Mbjdhw6yY,6389
22
22
  agentx/evaluations/results.py,sha256=w7TRUik4eXIqrznXvlF_L9hnObnHvgdRKvihfN1XeAU,4692
@@ -62,9 +62,9 @@ agentx/tracing/ci_types.py,sha256=zFVcZGvc1qbVDdOlEPQ1i5R6terqJHxCzFF4ZjouxxI,14
62
62
  agentx/tracing/eval_scope.py,sha256=ElMbPxpqpQBVuaUnHNlw9RIQu71oyOpd0yR55bDH8eI,2144
63
63
  agentx/tracing/ingest_client.py,sha256=5X6RyxtMq1XYgOzsMd3b2f2qpmYpsMnhKm7NB3oup00,17664
64
64
  agentx/tracing/tracer.py,sha256=qQojU-T4O8IJKyf9vue0Em66qPBTZKl3FMyr3KJKPnI,53770
65
- agentx_python-0.8.5.dist-info/licenses/LICENSE,sha256=gZVsM-nLsE8vlaY6NXXsVoo6IlCClxkToAWmhgT3y_s,10762
66
- agentx_python-0.8.5.dist-info/METADATA,sha256=WHqqeAmz7UcuecsbLSkGeN_8lGDLSQJa1EweRpJrLWc,20992
67
- agentx_python-0.8.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
68
- agentx_python-0.8.5.dist-info/entry_points.txt,sha256=rQqF1JTY3T1yfviBU1r8PU-5mBdfOk6P4bZ1L4BskIM,172
69
- agentx_python-0.8.5.dist-info/top_level.txt,sha256=s-q-HB9Gb_QdrZNacSeQyF_c25gQooMy7DlxzgLOHPk,7
70
- agentx_python-0.8.5.dist-info/RECORD,,
65
+ agentx_python-0.8.6.dist-info/licenses/LICENSE,sha256=gZVsM-nLsE8vlaY6NXXsVoo6IlCClxkToAWmhgT3y_s,10762
66
+ agentx_python-0.8.6.dist-info/METADATA,sha256=TtgnRoXPHmbRAmTFBQpjX7iN4Eq5-g6znYgTgZHc0uY,20992
67
+ agentx_python-0.8.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
68
+ agentx_python-0.8.6.dist-info/entry_points.txt,sha256=rQqF1JTY3T1yfviBU1r8PU-5mBdfOk6P4bZ1L4BskIM,172
69
+ agentx_python-0.8.6.dist-info/top_level.txt,sha256=s-q-HB9Gb_QdrZNacSeQyF_c25gQooMy7DlxzgLOHPk,7
70
+ agentx_python-0.8.6.dist-info/RECORD,,