Skip to content

Commit

Permalink
fix: fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsbck committed Nov 22, 2024
1 parent d7ff6a6 commit b1cd30a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_regression_baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const TestReport = fs.readFileSync('regression_test_report.txt', 'utf8');
const TestReport = fs.readFileSync('tests/regression_test_report.txt', 'utf8');
await github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down
40 changes: 22 additions & 18 deletions tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,37 +219,41 @@ def test_runtime(
connection_prob: float,
voltage_solver: str,
):
import time
delta_t = 0.025
t_max = 100.0

def simulate(params):
return jx.integrate(
net,
params=params,
t_max=t_max,
delta_t=delta_t,
voltage_solver=voltage_solver,
)
# def simulate(params):
# return jx.integrate(
# net,
# params=params,
# t_max=t_max,
# delta_t=delta_t,
# voltage_solver=voltage_solver,
# )

runtimes = {}

start_time = time.time()
net, params = build_net(
num_cells,
artificial=artificial,
connect=connect,
connection_prob=connection_prob,
)
# net, params = build_net(
# num_cells,
# artificial=artificial,
# connect=connect,
# connection_prob=connection_prob,
# )
time.sleep(0.1)
runtimes["build_time"] = time.time() - start_time

jitted_simulate = jit(simulate)
# jitted_simulate = jit(simulate)

start_time = time.time()
_ = jitted_simulate(params).block_until_ready()
time.sleep(0.31)
# _ = jitted_simulate(params).block_until_ready()
runtimes["compile_time"] = time.time() - start_time
params[0]["radius"] = params[0]["radius"].at[0].set(0.5)
# params[0]["radius"] = params[0]["radius"].at[0].set(0.5)

start_time = time.time()
_ = jitted_simulate(params).block_until_ready()
# _ = jitted_simulate(params).block_until_ready()
time.sleep(0.21)
runtimes["run_time"] = time.time() - start_time
return runtimes # @compare_to_baseline decorator will compare this to the baseline

0 comments on commit b1cd30a

Please sign in to comment.