cluster_tools 3.4.0__tar.gz → 3.4.2__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 (41) hide show
  1. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/PKG-INFO +1 -1
  2. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/batching.py +3 -2
  3. cluster_tools-3.4.2/cluster_tools/version.py +1 -0
  4. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools.egg-info/PKG-INFO +1 -1
  5. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/pyproject.toml +1 -1
  6. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_batching.py +0 -1
  7. cluster_tools-3.4.0/cluster_tools/version.py +0 -1
  8. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/LICENSE +0 -0
  9. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/README.md +0 -0
  10. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/__init__.py +0 -0
  11. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/call.py +0 -0
  12. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/file_wait_thread.py +0 -0
  13. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/multiprocessing_logging_handler.py +0 -0
  14. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/pickling.py +0 -0
  15. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/reflection.py +0 -0
  16. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/string_.py +0 -0
  17. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/tailf.py +0 -0
  18. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/_utils/warning.py +0 -0
  19. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executor_protocol.py +0 -0
  20. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/dask.py +0 -0
  21. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/multiprocessing_.py +0 -0
  22. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/multiprocessing_pickle.py +0 -0
  23. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/sequential.py +0 -0
  24. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/executors/sequential_pickle.py +0 -0
  25. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/remote.py +0 -0
  26. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/schedulers/__init__.py +0 -0
  27. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/schedulers/cluster_executor.py +0 -0
  28. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/schedulers/kube.py +0 -0
  29. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/schedulers/pbs.py +0 -0
  30. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools/schedulers/slurm.py +0 -0
  31. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools.egg-info/SOURCES.txt +0 -0
  32. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools.egg-info/dependency_links.txt +0 -0
  33. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools.egg-info/requires.txt +0 -0
  34. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/cluster_tools.egg-info/top_level.txt +0 -0
  35. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/setup.cfg +0 -0
  36. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_all.py +0 -0
  37. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_dask.py +0 -0
  38. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_deref_main.py +0 -0
  39. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_kubernetes.py +0 -0
  40. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_multiprocessing.py +0 -0
  41. {cluster_tools-3.4.0 → cluster_tools-3.4.2}/tests/test_slurm.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cluster_tools
3
- Version: 3.4.0
3
+ Version: 3.4.2
4
4
  Summary: Utility library for easily distributing code execution on clusters
5
5
  Author-email: scalable minds <hello@scalableminds.com>
6
6
  License-Expression: MIT
@@ -10,6 +10,7 @@ from typing import TypeVar
10
10
 
11
11
  from typing_extensions import ParamSpec
12
12
 
13
+ from cluster_tools._utils.reflection import get_function_name
13
14
  from cluster_tools.executor_protocol import Executor
14
15
 
15
16
  _T = TypeVar("_T")
@@ -122,7 +123,7 @@ class BatchingExecutor:
122
123
 
123
124
  for batch in _iter_batches(items, batch_size):
124
125
  batch_fn = partial(_apply_fn_to_batch, fn)
125
- batch_fn.__name__ = f"batch_{fn.__name__}" # type: ignore[attr-defined]
126
+ batch_fn.__name__ = f"batch_{get_function_name(fn)}" # type: ignore[attr-defined]
126
127
  (batch_future,) = self._executor.map_to_futures(batch_fn, [batch])
127
128
  item_futures: list[Future[_T]] = [Future() for _ in batch]
128
129
  all_item_futures.extend(item_futures)
@@ -160,7 +161,7 @@ class BatchingExecutor:
160
161
 
161
162
  def result_generator() -> Iterator[_T]:
162
163
  batch_fn = partial(_apply_fn_to_batch, fn)
163
- batch_fn.__name__ = f"batch_{fn.__name__}" # type: ignore[attr-defined]
164
+ batch_fn.__name__ = f"batch_{get_function_name(fn)}" # type: ignore[attr-defined]
164
165
  for batch_results in self._executor.map(
165
166
  batch_fn,
166
167
  _iter_batches(items, batch_size),
@@ -0,0 +1 @@
1
+ __version__ = '3.4.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cluster_tools
3
- Version: 3.4.0
3
+ Version: 3.4.2
4
4
  Summary: Utility library for easily distributing code execution on clusters
5
5
  Author-email: scalable minds <hello@scalableminds.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cluster_tools"
3
- version = "3.4.0" # filled by dunamai
3
+ version = "3.4.2" # filled by dunamai
4
4
  description = "Utility library for easily distributing code execution on clusters"
5
5
  authors = [{name= "scalable minds", email="hello@scalableminds.com"}]
6
6
  readme = "README.md"
@@ -1,4 +1,3 @@
1
- from concurrent.futures import CancelledError, Future
2
1
  from pathlib import Path
3
2
  from unittest.mock import patch
4
3
 
@@ -1 +0,0 @@
1
- __version__ = '3.4.0'
File without changes
File without changes
File without changes