Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DIA-1562: false precision in cost reports #347

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ types:
docs: Status of the refinement job
default: Pending
total_cost:
type: optional<float>
type: optional<string>
docs: Total cost of the refinement job (in USD)
previous_version:
type: optional<PromptVersion>
Expand Down
4 changes: 2 additions & 2 deletions .mock/definition/prompts/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ service:
prompt: prompt
refinement_job_id: refinement_job_id
refinement_status: Pending
total_cost: 1.1
total_cost: total_cost
previous_version:
title: title
parent_model: 1
Expand Down Expand Up @@ -309,7 +309,7 @@ service:
prompt: prompt
refinement_job_id: refinement_job_id
refinement_status: Pending
total_cost: 1.1
total_cost: total_cost
previous_version:
title: title
parent_model: 1
Expand Down
2 changes: 1 addition & 1 deletion src/label_studio_sdk/types/refined_prompt_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RefinedPromptResponse(pydantic_v1.BaseModel):
Status of the refinement job
"""

total_cost: typing.Optional[float] = pydantic_v1.Field(default=None)
total_cost: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Total cost of the refinement job (in USD)
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/prompts/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async def test_get_refined_prompt(client: LabelStudio, async_client: AsyncLabelS
"prompt": "prompt",
"refinement_job_id": "refinement_job_id",
"refinement_status": "Pending",
"total_cost": 1.1,
"total_cost": "total_cost",
"previous_version": {
"title": "title",
"parent_model": 1,
Expand Down Expand Up @@ -234,7 +234,7 @@ async def test_refine_prompt(client: LabelStudio, async_client: AsyncLabelStudio
"prompt": "prompt",
"refinement_job_id": "refinement_job_id",
"refinement_status": "Pending",
"total_cost": 1.1,
"total_cost": "total_cost",
"previous_version": {
"title": "title",
"parent_model": 1,
Expand Down