Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 10, 2024
1 parent 37151e0 commit 6bf7aea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion before-notebook.d/42_start-hq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -x

# NOTE: this cgroup folder hierachy is based on cgroupv2
# if the container is open in system where it has cgroupv1 it will fail.
# Since the image is mostly for demo server where we know the machine and OS I supposed
# Since the image is mostly for demo server where we know the machine and OS I supposed
# it should have cgroupv2 (> Kubernetes v1.25).
# We only build the server for demo server so it does not require user to have new cgroup.
# But for developers, please update your cgroup version to v2.
Expand Down
4 changes: 3 additions & 1 deletion src/aiidalab_qe/plugins/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def set_component_resources(component, code_info):
code: orm.Code = code_info["code"]
if code.computer.scheduler_type == "hyperqueue":
component.metadata.options.resources = {
"num_cpus": code_info["nodes"] * code_info["ntasks_per_node"] * code_info["cpus_per_task"]
"num_cpus": code_info["nodes"]
* code_info["ntasks_per_node"]
* code_info["cpus_per_task"]
}
else:
# XXX: jyu should properly deal with None type of scheduler_type which can be "core.direct" (will be replaced by hyperqueue) and "core.slurm" ...
Expand Down
2 changes: 1 addition & 1 deletion src/aiidalab_qe/setup/codes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import subprocess
from pathlib import Path
from shutil import which

from filelock import FileLock, Timeout

from aiida.common.exceptions import NotExistent
Expand Down Expand Up @@ -241,4 +242,3 @@ def _setup(computer):
raise RuntimeError(
"Installation process did not finish in the expected time."
) from None

0 comments on commit 6bf7aea

Please sign in to comment.