This pull request introduces a websocket-based flexible optimization feature to the Weavel library. The main changes include:
Addition of a new WebsocketClient class in weavel/clients/websocket_client.py for handling websocket connections and message processing.
Updates to the Worker class in weavel/_worker.py to support websocket-based operations.
Refactoring of types in weavel/types/ directory, including the introduction of new websocket-related types.
Improvements to error handling and logging throughout the codebase.
Version bump from 1.9.4 to 1.9.5 in setup.py.
Key changes include:
Implementation of a retry mechanism with tenacity library for robust connection handling.
Introduction of a custom JSON encoder for handling UUID and datetime objects.
Improved asynchronous operations and concurrent task management.
Enhanced logging capabilities with structured logging using structlog.
These changes aim to provide a more flexible and robust optimization process, likely improving the overall performance and reliability of the Weavel library.
Changes that Break Backward Compatibility
The Dataset, DatasetItem, Prompt, and PromptVersion classes have been renamed to WvDataset, WvDatasetItem, WvPrompt, and WvPromptVersion respectively. This change affects imports and usage throughout the codebase.
The ResponseFormat class has been removed from weavel/types/response_format.py and is now imported from ape.common.types. This may require updates to any code that directly used the previous ResponseFormat class.
The logging utilities in weavel/utils/logger.py have been replaced with a more comprehensive logging setup in weavel/utils/logging.py. This change affects how logging is configured and used throughout the project.
Description
This pull request introduces a websocket-based flexible optimization feature to the Weavel library. The main changes include:
WebsocketClient
class inweavel/clients/websocket_client.py
for handling websocket connections and message processing.Worker
class inweavel/_worker.py
to support websocket-based operations.weavel/types/
directory, including the introduction of new websocket-related types.setup.py
.Key changes include:
tenacity
library for robust connection handling.structlog
.These changes aim to provide a more flexible and robust optimization process, likely improving the overall performance and reliability of the Weavel library.
Changes that Break Backward Compatibility
The
Dataset
,DatasetItem
,Prompt
, andPromptVersion
classes have been renamed toWvDataset
,WvDatasetItem
,WvPrompt
, andWvPromptVersion
respectively. This change affects imports and usage throughout the codebase.The
ResponseFormat
class has been removed fromweavel/types/response_format.py
and is now imported fromape.common.types
. This may require updates to any code that directly used the previousResponseFormat
class.The logging utilities in
weavel/utils/logger.py
have been replaced with a more comprehensive logging setup inweavel/utils/logging.py
. This change affects how logging is configured and used throughout the project.Documentation
N/A
Created with Palmier