Skip to content

Commit c25e0b1

Browse files
committed
Fix pre-commit
1 parent d21d175 commit c25e0b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trinity/buffer/storage/queue.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ def is_json_file(path: str) -> bool:
2828
# Each priority_fn,
2929
# Args: item, kwargs
3030
# Returns: priority (float), put_into_queue (bool, decide whether to put item into queue)
31-
# Note that put_into_queue takes effect both for new item from the explorer
31+
# Note that put_into_queue takes effect both for new item from the explorer
3232
# and for item sampled from the buffer.
3333
PRIORITY_FUNC = Registry("priority_fn")
3434

3535

3636
@PRIORITY_FUNC.register_module("linear_decay")
3737
def linear_decay_priority(
38-
item: List[Experience],
38+
item: List[Experience],
3939
decay: float = 2.0,
4040
) -> Tuple[float, bool]:
4141
priority = float(item[0].info["model_version"] - decay * item[0].info["use_count"])
@@ -45,7 +45,7 @@ def linear_decay_priority(
4545

4646
@PRIORITY_FUNC.register_module("linear_decay_use_count_control")
4747
def linear_decay_use_count_control_priority(
48-
item: List[Experience],
48+
item: List[Experience],
4949
decay: float = 2.0,
5050
use_count_limit: int = 3,
5151
) -> Tuple[float, bool]:
@@ -163,7 +163,7 @@ async def _put(self, item: List[Experience], delay: float = 0) -> None:
163163
await asyncio.sleep(delay)
164164
if len(item) == 0:
165165
return
166-
166+
167167
priority, put_into_queue = self.priority_fn(item=item)
168168
if not put_into_queue:
169169
return

0 commit comments

Comments
 (0)