Skip to content

Commit

Permalink
updated experiments a bit for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmpercussion committed Aug 15, 2024
1 parent 642b883 commit 72ac869
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 9 additions & 5 deletions impsy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,25 @@ def build_network(dimension=4, units=64, mixes=5, layers=2):
return net


@click.command(name="test-mdrnn")
def test_mdrnn():
"""This command simply loads the MDRNN to test that it works and how long it takes."""
def time_network_build(dimension, size):
click.secho("Building MDRNN.")
start_build = time.time()
model_config = mdrnn_config("s")
model_config = mdrnn_config(size)
build_network(
4,
dimension,
model_config["units"],
model_config["mixes"],
model_config["layers"],
)
click.secho(f"Done in {round(time.time() - start_build, 2)}s.")


@click.command(name="test-mdrnn")
def test_mdrnn():
"""This command simply loads the MDRNN to test that it works and how long it takes."""
time_network_build(4, "s")


@click.command(name="test-speed")
def prediction_speed_test():
"""This command runs a speed test experiment with different sized MDRNN models. The output is written to a CSV file."""
Expand Down
6 changes: 6 additions & 0 deletions impsy/tests/test_experiments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from impsy import tests
import pytest

def test_time_network_build():
tests.time_network_build(2, "xs")

0 comments on commit 72ac869

Please sign in to comment.