发布

  • [OPIK-1494]: [SDK] Migrate to stream_experiments endpoints (#2142)

    frostbyte_neo 发布于 2025-05-27 10:58:52 +00:00

    • [OPIK-1494]: Refactor experiment fetching to use streaming API.

    Updated experiment data retrieval to leverage the streaming API for improved performance and scalability. Adjusted imports and error messages for consistency and clarified return documentation in the client method.

    • [OPIK-1494]: Refactored get_experiment_data_by_name() to use new stream experiments functionality.

    • [OPIK-1494]: Add E2E test for fetching experiments by name.

    This test validates the functionality of retrieving experiments using their names, ensuring accurate results for experiments with duplicate and unique names. It also verifies the persistence of experiment metadata and correctness of associated traces and scores.

    • [OPIK-1494]: Update exception messages for clarity

    Revised the exception text for "ExperimentNotFound" to improve readability and align with consistent messaging standards. These changes ensure error messages are clearer for users.

    • [OPIK-1494]: Refactor stream parsing to centralize logic in read_and_parse_full_stream

    Introduced read_and_parse_full_stream to consolidate and streamline batch processing logic for REST streams. Replaced redundant stream parsing implementations across multiple modules with the new function. Updated tests, constants, and signatures to align with the refactored code.

    • [OPIK-1494]: Add detailed token metrics to Haystack test assertions

    Extended test assertions to include detailed token metrics, such as accepted prediction tokens, audio tokens, reasoning tokens, and rejected prediction tokens for both prompt and completion stages. This improves coverage and ensures more granular validation of token statistics in tests.

    • [OPIK-1494]: Removed Python 3.8 from Haystack AI tests matrix to avoid conflicts with the latest release of the Haystack.

    Co-authored-by: Aliaksandr Kuzmik 98702584+alexkuzmik@users.noreply.github.com

    下载附件