oh-my-batch 0.5.2__py3-none-any.whl → 0.5.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oh_my_batch/batch.py CHANGED
@@ -2,7 +2,6 @@ import shlex
2
2
  import os
3
3
 
4
4
  from .util import split_list, ensure_dir, expand_globs, mode_translate
5
- from .assets import get_asset
6
5
 
7
6
 
8
7
  class BatchMaker:
oh_my_batch/combo.py CHANGED
@@ -263,6 +263,9 @@ class ComboMaker:
263
263
  return self
264
264
 
265
265
  def show_combos(self):
266
+ """
267
+ Show all combos in a human-readable format for debugging
268
+ """
266
269
  combos = self._make_combos()
267
270
  if not combos:
268
271
  print("No combos")
oh_my_batch/job.py CHANGED
@@ -87,14 +87,15 @@ class BaseJobManager:
87
87
  break
88
88
 
89
89
  time.sleep(interval)
90
+
91
+ error = False
90
92
  for job in jobs:
91
- error = False
92
93
  if not JobState.is_success(job['state']):
93
94
  logger.error('Job %s failed', job['script'])
94
95
  error = True
95
- if error:
96
+ if error and wait:
96
97
  raise RuntimeError('Some jobs failed')
97
-
98
+
98
99
  def wait(self, *job_ids, timeout=None, interval=10):
99
100
  """
100
101
  Wait for jobs to finish
@@ -135,7 +136,7 @@ class BaseJobManager:
135
136
 
136
137
  def _update_state(self, jobs: List[dict]):
137
138
  raise NotImplementedError
138
-
139
+
139
140
  def _submit_job(self, job: dict, submit_opts: str):
140
141
  raise NotImplementedError
141
142
 
@@ -170,7 +171,7 @@ class Slurm(BaseJobManager):
170
171
  break
171
172
  else:
172
173
  logger.error('Job %s not found in sacct output', job['id'])
173
- return jobs
174
+ return jobs
174
175
 
175
176
  def _submit_job(self, job:dict, submit_opts:str):
176
177
  submit_cmd = f'{self._sbatch_bin} {submit_opts} {job["script"]}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oh-my-batch
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary:
5
5
  License: GPL
6
6
  Author: weihong.xu
@@ -37,6 +37,9 @@ pip install oh-my-batch
37
37
 
38
38
  ## Examples
39
39
  * [TESLA workflow](./examples/tesla/): A customizable active learning workflow for training machine learning potentials.
40
+ * [TESLA PIMD workflow](./examples/tesla-pimd/): A customizable active learning workflow for training machine learning potentials with path integral molecular dynamics.
41
+ * [LAMMPS benchmark](./examples/lammps-benchmark/): Find out the best MPI and OpenMP setup for LAMMPS through benchmarking.
42
+
40
43
 
41
44
  ## Use cases
42
45
 
@@ -2,14 +2,14 @@ oh_my_batch/__init__.py,sha256=BsRNxZbqDWfaIZJGxzIDqCubRWztMGFDceW08TECuFs,98
2
2
  oh_my_batch/__main__.py,sha256=sWyFZMwWNvhkanwZSJRGfBBDoIevhC028dTSB67i6yI,61
3
3
  oh_my_batch/assets/__init__.py,sha256=Exub46UbQaz2V2eXpQeiVfnThQpXaNeuyjlGY6gBSZc,130
4
4
  oh_my_batch/assets/functions.sh,sha256=LaiavZBu84D7C1r-dWhf91vPTuHXCMV1DQZUIPVQnjE,1001
5
- oh_my_batch/batch.py,sha256=1aVLP2KAbfNo0Asw7khh5HGCrh1PbYLNXLmiR-sWWcs,3988
5
+ oh_my_batch/batch.py,sha256=i3q1zY2li-YyN_99zjlpNJlZqqF5PSO3hwW1e0_N2VE,3958
6
6
  oh_my_batch/cli.py,sha256=Jyz8q2pUYke3mfJS6F_G9S9hApddgXxQw1BsN6Kfkjc,553
7
- oh_my_batch/combo.py,sha256=6WorlC25L0AbbvXoJm_3JxnbGWWdG2VCH5Gm5vopeh4,10796
8
- oh_my_batch/job.py,sha256=8qFYscHGzIQhX-HrAGxCCv7h2T8Ls1Fj0gmNEBdP5Go,7227
7
+ oh_my_batch/combo.py,sha256=2d-vbKnn_UGKfnOp85le2vxiqj_qJXoIB4dAYJ8So_4,10885
8
+ oh_my_batch/job.py,sha256=Va-l24R6GxyqX2Ca5w6tr7hWgmJgQQRMHLjnlPAWkR4,7224
9
9
  oh_my_batch/misc.py,sha256=G_iOovRCrShBJJCc82QLN0CvMqW4adOefEoY1GedEiw,452
10
10
  oh_my_batch/util.py,sha256=5ve2QcviuF0UHFLrsXmjMTj0ogXJ4g05q1y-yWCFuOk,2409
11
- oh_my_batch-0.5.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
- oh_my_batch-0.5.2.dist-info/METADATA,sha256=ol5L2beaEHsy8rQ6aLnorf-DtAnytL-a_rDodkMNOM0,5174
13
- oh_my_batch-0.5.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- oh_my_batch-0.5.2.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
- oh_my_batch-0.5.2.dist-info/RECORD,,
11
+ oh_my_batch-0.5.4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
+ oh_my_batch-0.5.4.dist-info/METADATA,sha256=diLWMY_cgqxHdh48i9YxBgx11eCM12L2FMJJM2ujjIQ,5468
13
+ oh_my_batch-0.5.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ oh_my_batch-0.5.4.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
+ oh_my_batch-0.5.4.dist-info/RECORD,,