Skip to content

Commit 3c73caa

Browse files
committed
cleanup
1 parent 3598103 commit 3c73caa

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

psiflow/hamiltonians.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def get_app(self) -> Callable:
369369
# execution-side parameters of function are not included in self.parameters()
370370
evaluation = psiflow.context().definitions["ModelEvaluation"]
371371
resources = evaluation.wq_resources(1)
372-
resources.pop("gpus") # do not request GPU
372+
resources.pop("gpus", None) # do not request GPU
373373
return partial(
374374
apply_modelevaluation,
375375
function_cls=DispersionFunction,

psiflow/serialization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
# TODO: verify which attributes need to be serialized with a _to_serialize key?
16-
# TODO: what with attribute like 'Callable' (the apps created by various psiflow things?)
1716

1817

1918
CLS_KEY = "PSIFLOW_CLS"

psiflow/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def setup_logging(file: Path, level=logging.INFO) -> None:
1212

1313
fh = logging.FileHandler(file)
1414
formatter = logging.Formatter(
15-
fmt='%(asctime)s [%(levelname)s] %(name)s \t %(message)s',
15+
fmt='%(asctime)s [%(levelname)s] %(name)s - %(message)s',
1616
datefmt='%Y-%m-%d %H:%M'
1717
)
1818
fh.setFormatter(formatter)

psiflow/utils/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ def get_task_name_id(logfile: str) -> tuple[str, str]:
7070
def format_env_vars(env_vars: dict) -> str:
7171
if len(env_vars) == 0:
7272
return ""
73-
return "export" + " ".join([f"{k}={v}" for k, v in env_vars.items()])
73+
return "export " + " ".join([f"{k}={v}" for k, v in env_vars.items()])
7474

7575

tests/test_sampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def test_walker_serialization(dataset, tmp_path):
414414
assert len(f.read()) > 0
415415

416416
data = [psiflow.serialize(obj, copy_to=tmp_path) for obj in walkers]
417-
new_objects = [psiflow.deserialize(d.result()) for d in data]
417+
new_objects = [psiflow.deserialize(d).result() for d in data]
418418
psiflow.wait()
419419
for d in data:
420420
print(d.result())

0 commit comments

Comments
 (0)