docent-python 0.1.9a0__tar.gz → 0.1.10a0__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.
Potentially problematic release.
This version of docent-python might be problematic. Click here for more details.
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/.gitignore +1 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/PKG-INFO +1 -1
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/sdk/client.py +33 -31
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/pyproject.toml +1 -1
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/LICENSE.md +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/README.md +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/_log_util/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/_log_util/logger.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/_tiktoken_util.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/agent_run.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/chat/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/chat/content.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/chat/message.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/chat/tool.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/citation.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/metadata.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/regex.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/shared_types.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/data_models/transcript.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/loaders/load_inspect.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/py.typed +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/samples/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/samples/load.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/samples/log.eval +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/samples/tb_airline.json +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/sdk/__init__.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/trace.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/docent/trace_temp.py +0 -0
- {docent_python-0.1.9a0 → docent_python-0.1.10a0}/uv.lock +0 -0
|
@@ -196,7 +196,7 @@ class Docent:
|
|
|
196
196
|
response.raise_for_status()
|
|
197
197
|
return response.json()
|
|
198
198
|
|
|
199
|
-
def
|
|
199
|
+
def list_rubrics(self, collection_id: str) -> list[dict[str, Any]]:
|
|
200
200
|
"""List all rubrics for a given collection.
|
|
201
201
|
|
|
202
202
|
Args:
|
|
@@ -213,71 +213,73 @@ class Docent:
|
|
|
213
213
|
response.raise_for_status()
|
|
214
214
|
return response.json()
|
|
215
215
|
|
|
216
|
-
def
|
|
217
|
-
|
|
218
|
-
) -> list[dict[str, Any]]:
|
|
219
|
-
"""Get rubric results for a given collection, rubric and version.
|
|
216
|
+
def get_rubric_run_state(self, collection_id: str, rubric_id: str) -> dict[str, Any]:
|
|
217
|
+
"""Get rubric run state for a given collection and rubric.
|
|
220
218
|
|
|
221
219
|
Args:
|
|
222
220
|
collection_id: ID of the Collection.
|
|
223
|
-
rubric_id: The ID of the rubric to get
|
|
224
|
-
rubric_version: The version of the rubric to get results for.
|
|
221
|
+
rubric_id: The ID of the rubric to get run state for.
|
|
225
222
|
|
|
226
223
|
Returns:
|
|
227
|
-
|
|
224
|
+
dict: Dictionary containing rubric run state with results, job_id, and total_agent_runs.
|
|
228
225
|
|
|
229
226
|
Raises:
|
|
230
227
|
requests.exceptions.HTTPError: If the API request fails.
|
|
231
228
|
"""
|
|
232
|
-
url = f"{self._server_url}/rubric/{collection_id}/{rubric_id}/
|
|
233
|
-
response = self._session.get(url
|
|
229
|
+
url = f"{self._server_url}/rubric/{collection_id}/{rubric_id}/rubric_run_state"
|
|
230
|
+
response = self._session.get(url)
|
|
234
231
|
response.raise_for_status()
|
|
235
232
|
return response.json()
|
|
236
233
|
|
|
237
|
-
def
|
|
238
|
-
|
|
239
|
-
) -> list[dict[str, Any]]:
|
|
240
|
-
"""List all centroids for a given collection and rubric.
|
|
234
|
+
def get_clustering_state(self, collection_id: str, rubric_id: str) -> dict[str, Any]:
|
|
235
|
+
"""Get clustering state for a given collection and rubric.
|
|
241
236
|
|
|
242
237
|
Args:
|
|
243
238
|
collection_id: ID of the Collection.
|
|
244
|
-
rubric_id: The ID of the rubric to get
|
|
245
|
-
rubric_version: Optional version of the rubric. If not provided, uses latest.
|
|
239
|
+
rubric_id: The ID of the rubric to get clustering state for.
|
|
246
240
|
|
|
247
241
|
Returns:
|
|
248
|
-
|
|
242
|
+
dict: Dictionary containing job_id, centroids, and assignments.
|
|
249
243
|
|
|
250
244
|
Raises:
|
|
251
245
|
requests.exceptions.HTTPError: If the API request fails.
|
|
252
246
|
"""
|
|
253
|
-
url = f"{self._server_url}/rubric/{collection_id}/{rubric_id}/
|
|
254
|
-
|
|
255
|
-
if rubric_version is not None:
|
|
256
|
-
params["rubric_version"] = rubric_version
|
|
257
|
-
response = self._session.get(url, params=params)
|
|
247
|
+
url = f"{self._server_url}/rubric/{collection_id}/{rubric_id}/clustering_job"
|
|
248
|
+
response = self._session.get(url)
|
|
258
249
|
response.raise_for_status()
|
|
259
250
|
return response.json()
|
|
260
251
|
|
|
261
|
-
def
|
|
262
|
-
|
|
263
|
-
|
|
252
|
+
def get_cluster_centroids(self, collection_id: str, rubric_id: str) -> list[dict[str, Any]]:
|
|
253
|
+
"""Get centroids for a given collection and rubric.
|
|
254
|
+
|
|
255
|
+
Args:
|
|
256
|
+
collection_id: ID of the Collection.
|
|
257
|
+
rubric_id: The ID of the rubric to get centroids for.
|
|
258
|
+
|
|
259
|
+
Returns:
|
|
260
|
+
list: List of dictionaries containing centroid information.
|
|
261
|
+
|
|
262
|
+
Raises:
|
|
263
|
+
requests.exceptions.HTTPError: If the API request fails.
|
|
264
|
+
"""
|
|
265
|
+
clustering_state = self.get_clustering_state(collection_id, rubric_id)
|
|
266
|
+
return clustering_state.get("centroids", [])
|
|
267
|
+
|
|
268
|
+
def get_cluster_assignments(self, collection_id: str, rubric_id: str) -> dict[str, list[str]]:
|
|
264
269
|
"""Get centroid assignments for a given rubric.
|
|
265
270
|
|
|
266
271
|
Args:
|
|
267
272
|
collection_id: ID of the Collection.
|
|
268
273
|
rubric_id: The ID of the rubric to get assignments for.
|
|
269
|
-
rubric_version: The version of the rubric to get assignments for.
|
|
270
274
|
|
|
271
275
|
Returns:
|
|
272
|
-
|
|
276
|
+
dict: Dictionary mapping centroid IDs to lists of judge result IDs.
|
|
273
277
|
|
|
274
278
|
Raises:
|
|
275
279
|
requests.exceptions.HTTPError: If the API request fails.
|
|
276
280
|
"""
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
response.raise_for_status()
|
|
280
|
-
return response.json()
|
|
281
|
+
clustering_state = self.get_clustering_state(collection_id, rubric_id)
|
|
282
|
+
return clustering_state.get("assignments", {})
|
|
281
283
|
|
|
282
284
|
def get_agent_run(self, collection_id: str, agent_run_id: str) -> AgentRun | None:
|
|
283
285
|
"""Get a specific agent run by its ID.
|
|
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
|