Skip to content

Commit

Permalink
Merge pull request #46 from Ericgig/bugs.failings_nightly
Browse files Browse the repository at this point in the history
Fix failings nightly
  • Loading branch information
Ericgig authored Oct 10, 2023
2 parents 8fbc68f + b5fbb97 commit 7ed6ef8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ jobs:
lint-black:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: "actions/checkout@v2"
- name: Checkout
uses: "actions/checkout@v4"

- name: Setup Python
- name: Setup Python
uses: "actions/setup-python@v2"
with:
python-version: "3.10"

- name: Black
uses: psf/black@stable
with:
options: "--line-length 79 --check --diff"
src: "./qutip_benchmark"

- name: Install dependencies
- name: Install dependencies
run: |
python -VV
python -m site
Expand All @@ -29,4 +29,4 @@ jobs:
python -m pip install flake8-github-actions
- name: "Run Flake8"
run: "flake8 qutip_benchmark --format github"
run: "flake8 qutip_benchmark --format github"
5 changes: 4 additions & 1 deletion .github/workflows/nightly_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ defaults:

jobs:
benchmarks:
# Prevent running in all the forks
if: github.repository == 'qutip/qutip-benchmark'
name: ${{ matrix.os }}, python${{ matrix.python-version }}, ${{ matrix.case-name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
Expand All @@ -26,7 +29,7 @@ jobs:
case-name: [defaults]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: actions-bench
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ defaults:
jobs:
publish:
runs-on: ubuntu-latest
# if: ${{ github.repository == 'qutip/qutip-benchmark' && github.ref == 'refs/heads/master' }}
if: ${{ github.repository == 'qutip/qutip-benchmark' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
case-name: [defaults]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: actions-bench
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
.benchmarks
nosetests.xml

# Translations
Expand Down
4 changes: 3 additions & 1 deletion qutip_benchmark/benchmarks/bench_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def bench_mcsolve(benchmark, model_solve, size):
elif model_solve == "Qubit Spin Chain":
H, psi0, c_ops, e_ops = qubit_setup(size)

result = benchmark(mcsolve, H, psi0, tlist, c_ops, e_ops)
result = benchmark(mcsolve, H, psi0, tlist, c_ops, e_ops, ntraj=1)
return result


Expand All @@ -169,6 +169,8 @@ def bench_steadystate(benchmark, model_steady, size):
benchmark.group = "solvers:steadystate"

if model_steady == "Cavity":
if size >= 128:
pytest.skip("Slow test")
H, _, c_ops, _ = cavity_setup(size)

elif model_steady == "Jaynes-Cummings":
Expand Down
2 changes: 2 additions & 0 deletions qutip_benchmark/cli/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def run_benchmarks(args):
"--benchmark-columns=Mean,StdDev,rounds,Iterations",
"--benchmark-sort=name",
"--benchmark-autosave",
"--durations=0",
"--durations-min=1.0",
"-Wdefault",
]
+ args
Expand Down
1 change: 0 additions & 1 deletion qutip_benchmark/view_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ def plot_data(data, x_axis, y_axis, x_log, y_log, path):
markers = ["o--", "x-", "v:", "1-.", "*:"]
i = 0
for plot in data:

line_sep = data[plot]["line_sep"]
df = data[plot]["data"]
cols = list(df.columns)
Expand Down

0 comments on commit 7ed6ef8

Please sign in to comment.