@@ -781,7 +781,7 @@ def __init__(
781781 - If a BaseSampler subclass is provided, it will be instantiated
782782 - Defaults to SequentialSampler for simple sequential sampling
783783 - Example: sampler=GRPOGroupNSampler() (instance)
784- - Example: sampler=GRPOGroupNSampler (class)
784+ - Example: sampler=SequentialSampler (class)
785785 polling_mode: Whether to use polling mode for TransferQueue controller.
786786 - If False, the controller will raise an error when no enough data is available.
787787 - If True, the controller will return an empty BatchMeta when no enough data is available.
@@ -1015,12 +1015,12 @@ def get_metadata(
10151015 Raises:
10161016 TimeoutError: If waiting for sufficient data times out in fetch mode
10171017 """
1018- if partition_id not in self .partitions :
1019- self .create_partition (partition_id )
10201018
10211019 if mode == "insert" :
1022- partition = self ._get_partition (partition_id )
1020+ if partition_id not in self .partitions :
1021+ self .create_partition (partition_id )
10231022
1023+ partition = self ._get_partition (partition_id )
10241024 if data_fields :
10251025 # This is called during put_data call without providing metadata.
10261026 # try to use pre-allocated global index first
@@ -1083,6 +1083,7 @@ def get_metadata(
10831083 ready_for_consume_indexes ,
10841084 batch_size ,
10851085 ** (sampling_config or {}),
1086+ ** kwargs ,
10861087 )
10871088
10881089 # Check if we got valid results from the sampler
@@ -1240,6 +1241,7 @@ def clear_partition(self, partition_id: str, clear_consumption: bool = True):
12401241 partition .clear_data (global_indexes_range , clear_consumption )
12411242 self .index_manager .release_partition (partition_id )
12421243 self .partitions .pop (partition_id )
1244+ self .sampler .clear_cache (partition_id )
12431245
12441246 def clear_meta (
12451247 self ,
0 commit comments