matensemble 0.3.0__tar.gz → 0.3.3__tar.gz

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.
Files changed (44) hide show
  1. {matensemble-0.3.0 → matensemble-0.3.3}/PKG-INFO +10 -4
  2. {matensemble-0.3.0 → matensemble-0.3.3}/README.md +9 -3
  3. {matensemble-0.3.0 → matensemble-0.3.3}/pyproject.toml +1 -1
  4. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/pipeline.py +73 -2
  5. {matensemble-0.3.0 → matensemble-0.3.3}/LICENSE +0 -0
  6. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/.python-version +0 -0
  7. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/README.md +0 -0
  8. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/TODO.md +0 -0
  9. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/__init__.py +0 -0
  10. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/chore.py +0 -0
  11. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dash/assets/index-1X2cLUgt.js +0 -0
  12. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dash/assets/index-DRkGfWlx.css +0 -0
  13. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dash/index.html +0 -0
  14. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dash/vite.svg +0 -0
  15. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/__init__.py +0 -0
  16. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/driver.py +0 -0
  17. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/ensemble.py +0 -0
  18. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/__init__.py +0 -0
  19. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/bispectrum_calculator.py +0 -0
  20. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/compute_diffraction.py +0 -0
  21. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/compute_order_from_pairs.py +0 -0
  22. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/compute_twist.py +0 -0
  23. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/correlations.py +0 -0
  24. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/postprocessors/ovito_calculators.py +0 -0
  25. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/task_lib/AnalysisSubprocess.py +0 -0
  26. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/task_lib/AnalysysDescriptor.py +0 -0
  27. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/task_lib/MDSubprocess.py +0 -0
  28. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/task_lib/__init__.py +0 -0
  29. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/task_lib/analysis_registry.py +0 -0
  30. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/utils/__init__.py +0 -0
  31. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/utils/lammps_init.py +0 -0
  32. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/utils/preprocessors.py +0 -0
  33. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/utils/stat.py +0 -0
  34. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/dynopro/utils/stress_rotate_z_theta.py +0 -0
  35. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/fluxlet.py +0 -0
  36. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/logger.py +0 -0
  37. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/manager.py +0 -0
  38. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/model.py +0 -0
  39. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/redis/__init__.py +0 -0
  40. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/redis/service.py +0 -0
  41. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/redis/test.py +0 -0
  42. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/runtime_worker.py +0 -0
  43. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/strategy.py +0 -0
  44. {matensemble-0.3.0 → matensemble-0.3.3}/src/matensemble/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matensemble
3
- Version: 0.3.0
3
+ Version: 0.3.3
4
4
  Summary: An adaptive and highly asynchronous ensemble simulation workflow manager MatEnsemble (https://github.com/Q-CAD/MatEnsemble) built jointly on top of the hierarchical graph based scheduler FLUX and concurrent-futures infrastructure of python
5
5
  Author: Soumendu Bagchi, Kaleb Duchesneau
6
6
  Author-email: Soumendu Bagchi <soumendubagchi@gmail.com>, Kaleb Duchesneau <kalebduchesneau@gmail.com>
@@ -53,17 +53,23 @@ An optional in-tree **dynopro** stack supports streaming dynamics and on-the-fly
53
53
  </p>
54
54
 
55
55
 
56
+ ## Installation
57
+
56
58
  OCI images are published to GitHub Container Registry
57
59
 
58
60
  `ghcr.io/freddude2004/matensemble:baseline-vX.Y.Z`
59
61
 
60
62
  See the [container packages](https://github.com/FredDude2004/MatEnsemble/pkgs/container/matensemble) and the [Quick start](https://matensemble.readthedocs.io/en/latest/quickstart.html) in the docs for Apptainer/Singularity and site-specific notes.
61
63
 
62
- ### Development install
64
+ ### Anaconda
65
+
66
+ You can build a Conda environment with MatEnsemble and dependencies installed using the environment.yaml file.
63
67
 
64
- <!-- TODO: Add instructions for how to install and run here -->
68
+ ```bash
69
+ conda env create -f environment.yaml
70
+ ```
65
71
 
66
- ## Quick example
72
+ ## Example
67
73
 
68
74
  ```python
69
75
  from matensemble.pipeline import Pipeline
@@ -30,17 +30,23 @@ An optional in-tree **dynopro** stack supports streaming dynamics and on-the-fly
30
30
  </p>
31
31
 
32
32
 
33
+ ## Installation
34
+
33
35
  OCI images are published to GitHub Container Registry
34
36
 
35
37
  `ghcr.io/freddude2004/matensemble:baseline-vX.Y.Z`
36
38
 
37
39
  See the [container packages](https://github.com/FredDude2004/MatEnsemble/pkgs/container/matensemble) and the [Quick start](https://matensemble.readthedocs.io/en/latest/quickstart.html) in the docs for Apptainer/Singularity and site-specific notes.
38
40
 
39
- ### Development install
41
+ ### Anaconda
42
+
43
+ You can build a Conda environment with MatEnsemble and dependencies installed using the environment.yaml file.
40
44
 
41
- <!-- TODO: Add instructions for how to install and run here -->
45
+ ```bash
46
+ conda env create -f environment.yaml
47
+ ```
42
48
 
43
- ## Quick example
49
+ ## Example
44
50
 
45
51
  ```python
46
52
  from matensemble.pipeline import Pipeline
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "matensemble"
3
- version = "0.3.0"
3
+ version = "0.3.3"
4
4
  description = "An adaptive and highly asynchronous ensemble simulation workflow manager MatEnsemble (https://github.com/Q-CAD/MatEnsemble) built jointly on top of the hierarchical graph based scheduler FLUX and concurrent-futures infrastructure of python"
5
5
  readme = "README.md"
6
6
  license-files = ["LICENSE"]
@@ -133,7 +133,7 @@ class Pipeline:
133
133
  the module will use to find the *pickled* python object containing all
134
134
  of the data on the chore, and it will use it to import the function and
135
135
  call it with its respective arguments. The result will then be stored
136
- in the flux KVS
136
+ in the chores respective directory.
137
137
 
138
138
  Parameters
139
139
  ----------
@@ -228,7 +228,78 @@ class Pipeline:
228
228
 
229
229
  return decorator
230
230
 
231
- # def strategy_callback(self, ) -> Chore | None:
231
+ # WARNING: This is deprecated and only here for compatibility
232
+ def add_user_strat(self, chore_name: str, bolo_list: list[str]):
233
+ self._strategy_spec = {"name": chore_name, "bolo_list": bolo_list}
234
+
235
+ def strategy(
236
+ self,
237
+ bolo_list: list[str],
238
+ name: str | None = None,
239
+ num_tasks: int = 1,
240
+ cores_per_task: int = 1,
241
+ gpus_per_task: int = 0,
242
+ mpi: bool = False,
243
+ env: dict[str, str] | None = None,
244
+ inherit_env: bool = True,
245
+ ):
246
+ """
247
+ The strategy function creates a strategy, which is essentially a
248
+ callback function to another chore. But the callback function is itself
249
+ a chore. This function is expected to return an :obj:`ChoreSpec` which
250
+ will then dynamically spawn a new chore into the queue based on the
251
+ specification that is returned.
252
+
253
+ Parameters
254
+ ----------
255
+ bolo_list : list[str]
256
+ The names of the chores that you want this to callback on
257
+ name : str, optional
258
+ The name that will be assigned to the chore_id, defaults to the
259
+ name of the function.
260
+ num_tasks : int, optional
261
+ The number of tasks that will be launched with flux, defaults to 1
262
+ cores_per_task : int, optional
263
+ The number of CPU cores that are required to submit the chore,
264
+ defaults to 1
265
+ gpus_per_task : int, optional
266
+ The number of GPUs that are required to submit the chore, defaults
267
+ to 0
268
+ mpi : bool, optional
269
+ When True, sets Flux shell option ``mpi=pmi2`` on the chorespec
270
+ (default False).
271
+ env : dict[str, str], optional
272
+ Extra environment variables for the task. For Python chores,
273
+ ``PYTHONPATH`` is merged to include the workflow parent directory.
274
+ inherit_env : bool
275
+ If True (default), the Flux jobspec starts from the submitting
276
+ process environment and applies ``env`` overrides.
277
+
278
+ Returns
279
+ -------
280
+ Callable
281
+ A dummy function that just prints a warning to the stdout
282
+ """
283
+
284
+ def decorator(func: Callable[..., Any]) -> Callable[..., Any]:
285
+ for chore in bolo_list:
286
+ if chore not in self._registry:
287
+ raise Exception(
288
+ f"Error: The chore '{chore}' was not found in the registry"
289
+ )
290
+
291
+ registry_key = name or str(func.__qualname__)
292
+ self._registry[registry_key] = func
293
+
294
+ def disabled_wrapper(*args: Any, **kwargs: Any) -> None:
295
+ raise RuntimeError(
296
+ f"Do not call '{registry_key}' directly. "
297
+ "This strategy is managed internally by the workflow engine."
298
+ )
299
+
300
+ return disabled_wrapper
301
+
302
+ return decorator
232
303
 
233
304
  def exec(
234
305
  self,
File without changes