Skip to content

Commit 588191e

Browse files
author
Val Brodsky
committed
Update rdoc
1 parent 8add492 commit 588191e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Datarow payload templates
2+
===============================================================================================
3+
4+
.. automodule:: labelbox.schema.data_row_payload_templates
5+
:members:
6+
:show-inheritance:

libs/labelbox/src/labelbox/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,8 @@ def create_model_evaluation_project(
951951
>>> client.create_model_evaluation_project(name=project_name, dataset_id="clr00u8j0j0j0", data_row_count=10)
952952
>>> This creates a new project, and adds 100 datarows to the dataset with id "clr00u8j0j0j0" and assigns a batch of the newly created 10 data rows to the project.
953953
954+
>>> client.create_model_evaluation_project(name=project_name)
955+
>>> This creates a new project with no data rows.
954956
955957
"""
956958
autogenerate_data_rows = False

libs/labelbox/src/labelbox/schema/data_row_payload_templates.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ class ModelEvalutationTemlateRowData(BaseModel):
1818

1919

2020
class ModelEvaluationTemplate(BaseModel):
21+
"""
22+
Use this class to create a model evaluation data row.
23+
24+
Examples:
25+
>>> data = ModelEvaluationTemplate()
26+
>>> data.row_data.rootMessageIds = ["root1"]
27+
>>> vector = [random.uniform(1.0, 2.0) for _ in range(embedding.dims)]
28+
>>> data.embeddings = [...]
29+
>>> data.metadata_fields = [...]
30+
>>> data.attachments = [...]
31+
>>> content = data.model_dump()
32+
>>> task = dataset.create_data_rows([content])
33+
"""
34+
2135
row_data: ModelEvalutationTemlateRowData = Field(
2236
default=ModelEvalutationTemlateRowData()
2337
)

0 commit comments

Comments
 (0)