diff --git a/simulation/__init__.py b/simulation/__init__.py index fedf64572..60468fe1f 100644 --- a/simulation/__init__.py +++ b/simulation/__init__.py @@ -1,4 +1,4 @@ # Copyright 2023 MosaicML Streaming authors # SPDX-License-Identifier: Apache-2.0 -"""Streaming simulation for throughput, network downloads, and shuffle quality.""" \ No newline at end of file +"""Streaming simulation for throughput, network downloads, and shuffle quality.""" diff --git a/simulation/core/main.py b/simulation/core/main.py index 0cedbbb7b..116ba0e96 100644 --- a/simulation/core/main.py +++ b/simulation/core/main.py @@ -9,8 +9,8 @@ import numpy as np from core.node_tracker import NodeTracker from core.shard_downloads import run_cache_limit, simulate_shard_downloads +from core.sim_dataset import SimulationDataset from core.sim_time import Time -from core.simulation_dataset import SimulationDataset from core.utils import bytes_to_time, get_batches_epochs, time_to_bytes from numpy.typing import NDArray diff --git a/simulation/core/simulation_dataset.py b/simulation/core/sim_dataset.py similarity index 99% rename from simulation/core/simulation_dataset.py rename to simulation/core/sim_dataset.py index 90e7267ef..79677e7c2 100644 --- a/simulation/core/simulation_dataset.py +++ b/simulation/core/sim_dataset.py @@ -11,8 +11,8 @@ from typing import Optional, Sequence, Union import numpy as np -from core.simulation_spanner import SimulationSpanner -from core.simulation_world import SimulationWorld +from core.sim_spanner import SimulationSpanner +from core.sim_world import SimulationWorld from numpy.typing import NDArray from streaming.base import Stream, StreamingDataset diff --git a/simulation/core/simulation_spanner.py b/simulation/core/sim_spanner.py similarity index 100% rename from simulation/core/simulation_spanner.py rename to simulation/core/sim_spanner.py diff --git a/simulation/core/simulation_world.py b/simulation/core/sim_world.py similarity index 100% rename from simulation/core/simulation_world.py rename to simulation/core/sim_world.py diff --git a/simulation/core/utils.py b/simulation/core/utils.py index 3fa57a161..a89a02267 100644 --- a/simulation/core/utils.py +++ b/simulation/core/utils.py @@ -4,8 +4,8 @@ """Peripheral functions for simulation functionality.""" import numpy as np +from core.sim_dataset import SimulationDataset from core.sim_time import Time, TimeUnit -from core.simulation_dataset import SimulationDataset from numpy.typing import NDArray diff --git a/simulation/core/yaml_processing.py b/simulation/core/yaml_processing.py index 0c1064b05..d70ba2edc 100644 --- a/simulation/core/yaml_processing.py +++ b/simulation/core/yaml_processing.py @@ -5,8 +5,8 @@ from typing import Optional +from core.sim_dataset import SimulationDataset from core.sim_time import Time, TimeUnit, ensure_time -from core.simulation_dataset import SimulationDataset from omegaconf import DictConfig from omegaconf import OmegaConf as om diff --git a/simulation/interfaces/simcli.py b/simulation/interfaces/sim_cli.py similarity index 98% rename from simulation/interfaces/simcli.py rename to simulation/interfaces/sim_cli.py index 52cfad864..6931afa4e 100644 --- a/simulation/interfaces/simcli.py +++ b/simulation/interfaces/sim_cli.py @@ -1,7 +1,7 @@ # Copyright 2023 MosaicML Streaming authors # SPDX-License-Identifier: Apache-2.0 -"""simcli: simulate your training yaml from the command line.""" +"""sim_cli: simulate your training yaml from the command line.""" import os.path import sys diff --git a/simulation/interfaces/sim_script.py b/simulation/interfaces/sim_script.py index 8ca0afff1..7fd62d234 100644 --- a/simulation/interfaces/sim_script.py +++ b/simulation/interfaces/sim_script.py @@ -11,8 +11,8 @@ import humanize from core.create_index import create_stream_index from core.main import simulate +from core.sim_dataset import SimulationDataset from core.sim_time import TimeUnit, ensure_time -from core.simulation_dataset import SimulationDataset from core.utils import get_simulation_stats from interfaces.interface_utils import plot_simulation diff --git a/simulation/interfaces/sim_ui.py b/simulation/interfaces/sim_ui.py index 52d74189d..56dd9dfc7 100644 --- a/simulation/interfaces/sim_ui.py +++ b/simulation/interfaces/sim_ui.py @@ -19,8 +19,8 @@ from core.create_index import create_stream_index from core.main import simulate from core.shuffle_quality import analyze_shuffle_quality +from core.sim_dataset import SimulationDataset from core.sim_time import Time -from core.simulation_dataset import SimulationDataset from core.utils import get_total_batches from core.yaml_processing import create_simulation_dataset, ingest_yaml from interfaces.interface_utils import get_train_dataset_params diff --git a/simulation/launcher.py b/simulation/launcher.py index ea864b67b..6fea1f80e 100644 --- a/simulation/launcher.py +++ b/simulation/launcher.py @@ -3,8 +3,10 @@ """Launch simulator UI from command line when this package is installed.""" -import subprocess import os +import subprocess + def launch_simulation_ui(): - subprocess.run(["streamlit", "run", os.path.abspath("simulation/interfaces/sim_ui.py")]) \ No newline at end of file + """Launch the simulation UI.""" + subprocess.run(['streamlit', 'run', os.path.abspath('simulation/interfaces/sim_ui.py')]) diff --git a/simulation/testing/wandb_testing.py b/simulation/testing/wandb_testing.py index e3a619d87..61ea1a328 100644 --- a/simulation/testing/wandb_testing.py +++ b/simulation/testing/wandb_testing.py @@ -16,8 +16,8 @@ import wandb from core.create_index import create_stream_index from core.main import simulate +from core.sim_dataset import SimulationDataset from core.sim_time import TimeUnit, ensure_time -from core.simulation_dataset import SimulationDataset from numpy.typing import NDArray from streaming.base import Stream