Skip to content

Commit

Permalink
added 'simulator' command for easy startup
Browse files Browse the repository at this point in the history
  • Loading branch information
snarayan21 committed Oct 17, 2023
1 parent 650bcfb commit 63c8364
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
'streaming': ['py.typed'],
},
packages=setuptools.find_packages(exclude=['tests*']),
entry_points={
'console_scripts': ['simulator = simulation.launcher:launch_simulation_ui',],
},
classifiers=classifiers,
install_requires=install_requires,
extras_require=extra_deps,
Expand Down
4 changes: 4 additions & 0 deletions simulation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2023 MosaicML Streaming authors
# SPDX-License-Identifier: Apache-2.0

"""Streaming simulation for throughput, network downloads, and shuffle quality."""
10 changes: 10 additions & 0 deletions simulation/launcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 MosaicML Streaming authors
# SPDX-License-Identifier: Apache-2.0

"""Launch simulator UI from command line when this package is installed."""

import subprocess
import os

def launch_simulation_ui():
subprocess.run(["streamlit", "run", os.path.abspath("simulation/interfaces/sim_ui.py")])

0 comments on commit 63c8364

Please sign in to comment.