Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAP add export for environmental variables #42

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ipsuite/models/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import dataclasses
import importlib.resources as pkg_resources
import logging
import os
import subprocess as sp
import typing
from collections import OrderedDict
Expand Down Expand Up @@ -213,13 +212,10 @@ class GAP(MLModel):
gap_input_script: Path = zntrack.dvc.outs(zntrack.nwd / "gap.input")

#
openblas_num_threads = zntrack.meta.Text(None)
OPENBLAS_NUM_THREADS = zntrack.meta.Environment(None)

#
def _post_init_(self):
if self.openblas_num_threads is not None:
os.environ["OPENBLAS_NUM_THREADS"] = self.openblas_num_threads

if not self.state.loaded:
if self.soap is None:
self.soap = {}
Expand Down
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python = ">=3.10,<3.12"
libclang = "^15"

znh5md = "^0.1.6a0"
zntrack = "^0.6.0a3"
zntrack = "^0.6.0a4"

ase = "^3.22.1"

Expand Down