Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ziiiki committed Nov 7, 2024
1 parent bac4ed6 commit 7be92aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
6 changes: 5 additions & 1 deletion docs/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### New features since last release

- Support GRES in %%submit_job magic method

[#828](https://github.com/qilimanjaro-tech/qililab/pull/828)

- Added intermediate frequency to single input lines on qm. The default is 0 (this prevents some bugs from qua-qm). Now it is possible to use the set_parameter IF and qm.set_frequency for buses with single_input.

[#807](https://github.com/qilimanjaro-tech/qililab/pull/807)
Expand Down Expand Up @@ -101,7 +105,7 @@ instruments:
...
```

[#826](https://github.com/qilimanjaro-tech/qililab/pull/826)
[#826](https://github.com/qilimanjaro-tech/qililab/pull/826)

### Improvements

Expand Down
11 changes: 1 addition & 10 deletions src/qililab/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import ast
import os
import subprocess # noqa: S404
from types import ModuleType

from IPython.core.magic import needs_local_scope, register_cell_magic
Expand Down Expand Up @@ -96,15 +95,7 @@ def submit_job(line: str, cell: str, local_ns: dict) -> None:
low_priority = args.low_priority

if gres is None:
try:
sinfo_process = subprocess.run(["/usr/bin/sinfo", "-o", "%G"], capture_output=True, text=True, check=True) # noqa: S603
sinfo_output = sinfo_process.stdout.strip()
except subprocess.CalledProcessError as e:
sinfo_output = f"Error running sinfo: {e}"

error_message = f"GRES needs to be provided! See the available ones:\n{sinfo_output}"
raise ValueError(error_message)

raise ValueError("GRES needs to be provided! See the available ones typing 'sinfo -o '%G''in the terminal")
nice_factor = 0
if low_priority in ["True", "true"]:
nice_factor = 1000000 # this ensures Lab jobs have 0 priority, same as QaaS jobs
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_submit_job_no_gres_provided(self, ip):
"""Check ValueError is raised in case GRES is not provided."""
ip.run_cell(raw_cell="a=1\nb=1")
with pytest.raises(
ValueError, match="GRES needs to be provided!"
ValueError, match="GRES needs to be provided! See the available ones typing 'sinfo -o '%G'' in the terminal"
):
ip.run_cell_magic(
magic_name="submit_job",
Expand Down

0 comments on commit 7be92aa

Please sign in to comment.