Multiclass-interface 1.7__tar.gz → 1.8__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.
- {multiclass_interface-1.7 → multiclass_interface-1.8/Multiclass_interface.egg-info}/PKG-INFO +1 -1
- {multiclass_interface-1.7/Multiclass_interface.egg-info → multiclass_interface-1.8}/PKG-INFO +1 -1
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/mpi_interface.py +6 -4
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/test_mpi.py +1 -1
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/version.py +2 -2
- {multiclass_interface-1.7 → multiclass_interface-1.8}/.gitignore +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/.gitlab-ci.yml +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/LICENSE +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/SOURCES.txt +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/dependency_links.txt +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/requires.txt +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/top_level.txt +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/README.md +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/__init__.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/multi_object_list.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/multiprocess_interface.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/__init__.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/my_test_cls.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/test_multiclass_list.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/test_multiprocessinterface.py +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/pyproject.toml +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/sequence_diagrams.md +0 -0
- {multiclass_interface-1.7 → multiclass_interface-1.8}/setup.cfg +0 -0
|
@@ -124,7 +124,10 @@ class MPIClassInterface():
|
|
|
124
124
|
|
|
125
125
|
def get_input(self, name, i, args, kwargs):
|
|
126
126
|
use_rank = self.use_rank
|
|
127
|
-
|
|
127
|
+
if COLLECTIVE_MPI:
|
|
128
|
+
N = np.sum(use_rank)
|
|
129
|
+
else:
|
|
130
|
+
N = 1
|
|
128
131
|
if use_rank[i]:
|
|
129
132
|
def get_arg(arg):
|
|
130
133
|
if isinstance(arg, list) and len(arg) == N:
|
|
@@ -149,14 +152,13 @@ class MPIClassInterface():
|
|
|
149
152
|
inp = [self.get_input(name, i, args, kwargs) for i in range(size)]
|
|
150
153
|
return self.run_task(inp)
|
|
151
154
|
else:
|
|
152
|
-
|
|
155
|
+
method, args, kwargs = self.get_input(name, 0, args, kwargs)
|
|
156
|
+
return [self.do_task(name, args, kwargs)]
|
|
153
157
|
|
|
154
158
|
if hasattr(getattr(self.object, name), '__call__'):
|
|
155
159
|
res = wrap
|
|
156
160
|
else:
|
|
157
161
|
res = wrap()
|
|
158
|
-
if not COLLECTIVE_MPI:
|
|
159
|
-
res = [res]
|
|
160
162
|
return res
|
|
161
163
|
|
|
162
164
|
def __setattr__(self, name, value):
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/test_mpi.py
RENAMED
|
@@ -53,7 +53,7 @@ def mpitest_non_collective_mpi():
|
|
|
53
53
|
with MPIClassInterface(MyTest, [(i + 10,) for i in range(N)]) as m:
|
|
54
54
|
|
|
55
55
|
try:
|
|
56
|
-
assert m.get_id() == rank + 10
|
|
56
|
+
assert m.get_id()[0] == rank + 10, m.get_id()
|
|
57
57
|
assert rank < N # rank > N will fail with ChildProcessError
|
|
58
58
|
except ChildProcessError:
|
|
59
59
|
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/Multiclass_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/multi_object_list.py
RENAMED
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/multiprocess_interface.py
RENAMED
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/__init__.py
RENAMED
|
File without changes
|
{multiclass_interface-1.7 → multiclass_interface-1.8}/multiclass_interface/tests/my_test_cls.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|