File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
sdks/python/apache_beam/ml/rag Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -584,15 +584,3 @@ def batch_elements_kwargs(self) -> Dict[str, int]:
584584def join_fn (left : Embedding , right : Dict [str , Any ]) -> Embedding :
585585 left .metadata ['enrichment_data' ] = right
586586 return left
587-
588-
589- def unpack_dataclass_with_kwargs (dataclass_instance ):
590- # Create a copy of the dataclass's __dict__.
591- params_dict : dict = dataclass_instance .__dict__ .copy ()
592-
593- # Extract the nested kwargs dictionary.
594- nested_kwargs = params_dict .pop ('kwargs' , {})
595-
596- # Merge the dictionaries, with nested_kwargs taking precedence
597- # in case of duplicate keys.
598- return {** params_dict , ** nested_kwargs }
Original file line number Diff line number Diff line change 2828from typing import List
2929from typing import Optional
3030from typing import Tuple
31+ from typing import Type
3132
3233from apache_beam .ml .rag .types import Chunk
3334from apache_beam .ml .rag .types import Content
@@ -148,7 +149,7 @@ def retry_with_backoff(
148149 retry_delay : float = 1.0 ,
149150 retry_backoff_factor : float = 2.0 ,
150151 operation_name : str = "operation" ,
151- exception_types : Tuple [type , ...] = (Exception , )
152+ exception_types : Tuple [Type [ BaseException ] , ...] = (Exception , )
152153) -> Any :
153154 """Executes an operation with retry logic and exponential backoff.
154155
You can’t perform that action at this time.
0 commit comments