Skip to content

Commit

Permalink
Pass pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
knighton committed Dec 30, 2023
1 parent a51a02c commit 1ef3e5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scripts/writing/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from functools import partial
from shutil import rmtree
from time import time
from typing import Dict, Iterable, List, Optional, Tuple, TypeVar
from typing import Any, Dict, Iterable, List, Optional, Tuple, TypeVar

import lance
import numpy as np
Expand Down Expand Up @@ -259,7 +259,7 @@ def _write_csv(nums: List[int],
txts: List[str],
root: str,
size_limit: Optional[int],
show_progress: bool = True) -> None:
show_progress: bool = True) -> Dict[str, Any]:
"""Save the dataset in Streaming CSV form.
Args:
Expand Down Expand Up @@ -291,7 +291,7 @@ def _write_jsonl(nums: List[int],
txts: List[str],
root: str,
size_limit: Optional[int],
show_progress: bool = True) -> None:
show_progress: bool = True) -> Dict[str, Any]:
"""Save the dataset Streaming JSON form.
Args:
Expand Down Expand Up @@ -323,7 +323,7 @@ def _write_mds(nums: List[int],
txts: List[str],
root: str,
size_limit: Optional[int],
show_progress: bool = True) -> None:
show_progress: bool = True) -> Dict[str, Any]:
"""Save the dataset in Streaming MDS form.
Args:
Expand Down
2 changes: 1 addition & 1 deletion streaming/base/format/base/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def get_stats(self, num_groups: Optional[int] = 100) -> Dict[str, Any]:
part = timer['stats']['total']
timer['stats']['frac_of_parts'] = part / sum_of_parts

obj['named_timers'] = named_timers
obj['named_timers'] = named_timers # pyright: ignore

return obj

Expand Down

0 comments on commit 1ef3e5d

Please sign in to comment.