Skip to content

Commit

Permalink
Merge branch 'main' into Issue753
Browse files Browse the repository at this point in the history
  • Loading branch information
snarayan21 committed Aug 15, 2024
2 parents 114310a + 63b471e commit 5647946
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 21 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ select = [
"LOG",
"PERF",
"PLE",
"UP006"
"UP006",
"F401",
]
extend-safe-fixes = [
"UP006",
Expand Down
2 changes: 1 addition & 1 deletion scripts/compression/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from argparse import ArgumentParser, Namespace
from collections import defaultdict
from dataclasses import dataclass
from typing import Dict, List, Optional
from typing import Optional

import numpy as np
from matplotlib import pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion scripts/hashing/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from argparse import ArgumentParser, Namespace
from collections import defaultdict
from typing import Dict, List, Optional, Tuple
from typing import Optional

import numpy as np
from matplotlib import pyplot as plt
Expand Down
1 change: 0 additions & 1 deletion scripts/partition/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from argparse import ArgumentParser, Namespace
from time import time
from typing import List

import numpy as np
from tqdm import tqdm
Expand Down
1 change: 0 additions & 1 deletion scripts/partition/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""Plot results of comparing streaming dataset partitioning algorithms."""

from argparse import ArgumentParser, Namespace
from typing import Dict, List, Tuple

from matplotlib import pyplot as plt

Expand Down
2 changes: 1 addition & 1 deletion scripts/samples/bench_and_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from contextlib import contextmanager
from shutil import rmtree
from time import time, time_ns
from typing import Any, Callable, Dict, Iterator, List, Tuple
from typing import Any, Callable, Iterator

import numpy as np
from matplotlib import pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion scripts/serialization/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from glob import glob
from shutil import rmtree
from time import time
from typing import Any, Callable, Dict, Iterator, List
from typing import Any, Callable, Iterator

import numpy as np
import pandas as pd
Expand Down
1 change: 0 additions & 1 deletion scripts/shuffle/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""Plot results of comparing streaming dataset shuffling algorithms."""

from argparse import ArgumentParser, Namespace
from typing import Dict, List, Tuple

from matplotlib import pyplot as plt

Expand Down
2 changes: 1 addition & 1 deletion simulation/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import logging
import time
from typing import Generator, Tuple, Union
from typing import Generator, Union

import numpy as np
from core.node_tracker import NodeTracker
Expand Down
2 changes: 1 addition & 1 deletion simulation/core/node_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"""Class for tracking node information during simulation."""

from typing import Optional, Tuple
from typing import Optional

import numpy as np
from core.last_used_ordered_set import LastUsedOrderedSet
Expand Down
2 changes: 1 addition & 1 deletion simulation/core/shard_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"""Functions for simulating shard downloads and calculating needed cache limit for downloads."""

from typing import Optional, Tuple
from typing import Optional

import numpy as np
from core.node_tracker import NodeTracker
Expand Down
1 change: 0 additions & 1 deletion simulation/core/shuffle_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""Determine shuffle quality of a run over a fixed number of samples."""

import logging
from typing import Tuple

import numpy as np
from core.utils import remove_padded_samples
Expand Down
2 changes: 0 additions & 2 deletions simulation/core/sim_spanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

"""Mapping of global sample index to shard index for simulation purposes."""

from typing import Tuple

from streaming.base.spanner import Spanner


Expand Down
2 changes: 0 additions & 2 deletions simulation/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

"""Peripheral functions for simulation functionality."""

from typing import Tuple

import numpy as np
from core.sim_dataset import SimulationDataset
from core.sim_time import Time, TimeUnit
Expand Down
2 changes: 1 addition & 1 deletion simulation/core/yaml_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"""Ingest yaml and create SimulationDataset."""

from typing import Optional, Tuple
from typing import Optional

from core.sim_dataset import SimulationDataset
from core.sim_time import Time, TimeUnit, ensure_time
Expand Down
2 changes: 1 addition & 1 deletion streaming/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import streaming.multimodal as multimodal
import streaming.text as text
import streaming.vision as vision
from streaming._version import __version__
from streaming._version import __version__ # noqa: F401
from streaming.base import (CSVWriter, JSONWriter, LocalDataset, MDSWriter, Stream,
StreamingDataLoader, StreamingDataset, TSVWriter, XSVWriter)

Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import pytest
from moto import mock_aws

from tests.common.utils import compressed_local_remote_dir # pyright: ignore
from tests.common.utils import get_free_tcp_port # pyright: ignore
from tests.common.utils import local_remote_dir # pyright: ignore
from tests.common.utils import compressed_local_remote_dir # pyright: ignore # noqa: F401
from tests.common.utils import get_free_tcp_port # pyright: ignore # noqa: F401
from tests.common.utils import local_remote_dir # pyright: ignore # noqa: F401

MY_BUCKET = 'streaming-test-bucket'
MY_PREFIX = 'train'
Expand Down

0 comments on commit 5647946

Please sign in to comment.