Skip to content

Rename *InferenceDatapointInput in the client #2130

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

GabrielBianconi
Copy link
Contributor

@GabrielBianconi GabrielBianconi commented May 14, 2025

It's confusing to use a suffix with Input if the class has input and output fields.


Important

Renames ChatInferenceDatapointInput and JsonInferenceDatapointInput to ChatDatapointInsert and JsonDatapointInsert, respectively, with deprecation of old names.

  • Renames:
    • ChatInferenceDatapointInput to ChatDatapointInsert in types.py and datasets.rs.
    • JsonInferenceDatapointInput to JsonDatapointInsert in types.py and datasets.rs.
  • Deprecation:
    • ChatInferenceDatapointInput and JsonInferenceDatapointInput are marked as deprecated but still available for backward compatibility.
  • Tests:
    • Updated tests in test_client.py to use new class names and ensure deprecated classes are still supported.

This description was created by Ellipsis for 265be3c. You can customize this summary. It will automatically update as commits are pushed.

@Copilot Copilot AI review requested due to automatic review settings May 14, 2025 00:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames the "InferenceDatapointInput" suffix in client types to "DatapointInsert" for improved clarity.

  • Renames ChatInferenceDatapointInput to ChatDatapointInsert
  • Renames JsonInferenceDatapointInput to JsonDatapointInsert
  • Updates tests and type definitions while preserving deprecated aliases with warnings

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tensorzero-internal/src/endpoints/datasets.rs Renamed types in deserialization and struct definitions
clients/python/tests/test_client.py Updated test cases to use new types and preserved deprecated usage
clients/python/tensorzero/types.py Refactored type declarations including deprecation wrappers
clients/python/tensorzero/tensorzero.pyi Updated type annotations to reflect the renaming
clients/python/tensorzero/init.py Revised exports with deprecated types noted
Comments suppressed due to low confidence (2)

clients/python/tests/test_client.py:2897

  • Consider adding tests to explicitly verify that using ChatInferenceDatapointInput triggers a DeprecationWarning, ensuring the deprecation mechanism works as intended.
ChatInferenceDatapointInput(

clients/python/tensorzero/types.py:433

  • Verify that the deprecation warning's stacklevel (currently set to 2) correctly points to the user's call site. This ensures that the warning message provides clear guidance to developers.
# CAREFUL: deprecated

@GabrielBianconi GabrielBianconi added this pull request to the merge queue May 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 14, 2025
@GabrielBianconi GabrielBianconi added this pull request to the merge queue May 14, 2025
Merged via the queue into main with commit 75dbc5e May 14, 2025
23 checks passed
@GabrielBianconi GabrielBianconi deleted the gb/deprecate-datapoint-class-names branch May 14, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy