MATE-runtime 1.2.0__tar.gz → 1.3.0__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.
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/PKG-INFO +2 -2
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/pyproject.toml +2 -2
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/canonical.py +9 -8
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/conformance/checks.py +3 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/conformance/sampler.py +13 -4
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/.gitignore +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/COPYING +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/COPYING.LESSER +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/README.md +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/__main__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/cli/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/cli/commands.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/cli/workdir.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/compat/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/compat/interface.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/compat/sizes.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/axes.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/builders.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/calendar.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/criteria.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/events.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/invariance.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/loader.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/model.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/resolve.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/runtable.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/seeds.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/stages.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/structure.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/config/toml.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/conformance/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/conformance/baseline.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/errors.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/evaluation/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/evaluation/budget.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/evaluation/invalids.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/evaluation/requests.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/accelerator.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/base.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/choose.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/devices.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/process.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/serial.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/thread.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/execution/vectorised.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/launch.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/continuous.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/driver.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/events.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/generational.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/owns_loop.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/loop/subpops.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/construct.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/discovery.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/registry.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/software.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/modules/versions.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/numerics.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/control.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/display.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/hub.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/records.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/observation/sinks.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/provenance.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/catalogue.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/front.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/readout.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/series.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/readout/statistics.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/checkpointing.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/contexts.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/declarations.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/plan.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/preconditions.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/record.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/run.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/specs.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/run/times.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/scheduling/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/scheduling/local.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/scheduling/slurm.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/__init__.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/checkpoint.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/codec.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/database.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/lease.py +0 -0
- {mate_runtime-1.2.0 → mate_runtime-1.3.0}/src/MATE/storage/rundir.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: MATE-runtime
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Runtime of MATE, the Modular Algorithmic Toolkit for Evolution: runs, records and replays artificial evolution experiments
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/artificial_evolution/mate/mate
|
|
6
6
|
Project-URL: Issues, https://gitlab.com/artificial_evolution/mate/mate/-/issues
|
|
@@ -15,7 +15,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering
|
|
17
17
|
Requires-Python: >=3.14
|
|
18
|
-
Requires-Dist: mate-contract<2,>=1.
|
|
18
|
+
Requires-Dist: mate-contract<2,>=1.3
|
|
19
19
|
Requires-Dist: packaging>=24
|
|
20
20
|
Requires-Dist: rich>=13.7
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "MATE-runtime"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.3.0"
|
|
8
8
|
description = "Runtime of MATE, the Modular Algorithmic Toolkit for Evolution: runs, records and replays artificial evolution experiments"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
@@ -21,7 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3",
|
|
22
22
|
"Topic :: Scientific/Engineering",
|
|
23
23
|
]
|
|
24
|
-
dependencies = ["MATE-contract>=1.
|
|
24
|
+
dependencies = ["MATE-contract>=1.3,<2", "packaging>=24", "rich>=13.7"]
|
|
25
25
|
|
|
26
26
|
[project.scripts]
|
|
27
27
|
MATE = "MATE.cli:main"
|
|
@@ -15,7 +15,7 @@ from types import MappingProxyType
|
|
|
15
15
|
from typing import TYPE_CHECKING, Any
|
|
16
16
|
|
|
17
17
|
import numpy as np
|
|
18
|
-
from MATE_contract import Real
|
|
18
|
+
from MATE_contract import NetworkSpec, Real
|
|
19
19
|
|
|
20
20
|
if TYPE_CHECKING: # model imports this module; annotations are evaluated lazily
|
|
21
21
|
from MATE.config.model import Value
|
|
@@ -387,9 +387,10 @@ def digest(value: Value) -> str:
|
|
|
387
387
|
return hashlib.sha256(_encode(tag(value))).hexdigest()
|
|
388
388
|
|
|
389
389
|
|
|
390
|
-
# Fields written only when they differ from their default
|
|
391
|
-
#
|
|
392
|
-
_WRITTEN_WHEN_SET: Mapping[type, tuple[str, ...]] = MappingProxyType(
|
|
390
|
+
# Fields written only when they differ from their default: a spec that does not use one keeps
|
|
391
|
+
# the plain form, hence the digest, it had before the field existed.
|
|
392
|
+
_WRITTEN_WHEN_SET: Mapping[type, tuple[str, ...]] = MappingProxyType(
|
|
393
|
+
{Real: ("periodic",), NetworkSpec: ("sink_outputs",)})
|
|
393
394
|
|
|
394
395
|
|
|
395
396
|
def plain(obj: object) -> Value:
|
|
@@ -405,10 +406,10 @@ def plain(obj: object) -> Value:
|
|
|
405
406
|
-------
|
|
406
407
|
Value
|
|
407
408
|
Dataclasses become ``{"__type__": name, field: ...}``, except that ``Real`` writes
|
|
408
|
-
``periodic`` only when it is true; arrays
|
|
409
|
-
values)}``; enum members ``{"__enum__":
|
|
410
|
-
``(key, value)`` pairs, in insertion order;
|
|
411
|
-
scalars.
|
|
409
|
+
``periodic`` and ``NetworkSpec`` ``sink_outputs`` only when it is true; arrays
|
|
410
|
+
``{"__array__": (dtype.str, shape, flat values)}``; enum members ``{"__enum__":
|
|
411
|
+
"Class.NAME"}``; mappings tuples of ``(key, value)`` pairs, in insertion order;
|
|
412
|
+
sequences tuples; numpy scalars Python scalars.
|
|
412
413
|
|
|
413
414
|
Raises
|
|
414
415
|
------
|
|
@@ -403,6 +403,9 @@ def _network_violations(where: str, organ: Network, spec: NetworkSpec,
|
|
|
403
403
|
found.append(f"{where}: {hidden} hidden nodes, the spec fixes {bound} ([K] V5)")
|
|
404
404
|
if not spec.recurrent and not _acyclic(n, edges):
|
|
405
405
|
found.append(f"{where}: a cycle in a network declared recurrent = False ([K] V5)")
|
|
406
|
+
if spec.sink_outputs and np.any((edges[:, 0] >= n_in) & (edges[:, 0] < n_in + n_out)):
|
|
407
|
+
found.append(f"{where}: an edge leaves an output node in a network declared "
|
|
408
|
+
"sink_outputs = True ([K] V5)")
|
|
406
409
|
found += _array_violations(f"{where}.node_attrs", spec.node_attributes, organ.node_attrs,
|
|
407
410
|
organ.filled, (n,))
|
|
408
411
|
found += _array_violations(f"{where}.edge_attrs", spec.edge_attributes, organ.edge_attrs,
|
|
@@ -92,6 +92,8 @@ def _network(name: str, spec: NetworkSpec, key: Key) -> Network:
|
|
|
92
92
|
# Node layout of the ordering convention ([K] §5.2): inputs, outputs, then hidden nodes.
|
|
93
93
|
sources, targets = np.meshgrid(np.arange(n), np.arange(n), indexing="ij")
|
|
94
94
|
admissible = (sources != targets) & (targets >= n_in)
|
|
95
|
+
if spec.sink_outputs:
|
|
96
|
+
admissible &= (sources < n_in) | (sources >= n_in + n_out)
|
|
95
97
|
if not spec.recurrent:
|
|
96
98
|
rank = np.empty(n, dtype=np.int64)
|
|
97
99
|
rank[rng.permutation(n)] = np.arange(n)
|
|
@@ -135,8 +137,9 @@ def sample_phenotype(spec: PhenotypeSpec, key: Key) -> Phenotype:
|
|
|
135
137
|
hidden count is drawn uniformly in a bounded ``number_of_hidden_nodes`` (taken as is when
|
|
136
138
|
fixed, 0 when ``None``) on ``key.child(organ, 0).rng()``; on the same stream, when
|
|
137
139
|
``recurrent`` is false, a random node order; then each ordered pair of distinct nodes whose
|
|
138
|
-
target is not an input node (
|
|
139
|
-
order) carries an edge with
|
|
140
|
+
target is not an input node (when ``sink_outputs``, whose source is not an output node;
|
|
141
|
+
when acyclic, whose source precedes its target in that order) carries an edge with
|
|
142
|
+
probability ``EDGE_PROBABILITY``. Nodes are numbered inputs,
|
|
140
143
|
outputs, then hidden nodes (the ordering convention of ``Network``); edges are ``(E, 2)``,
|
|
141
144
|
in row-major order of their (source, target).
|
|
142
145
|
"""
|
|
@@ -159,7 +162,9 @@ def reference_specs() -> list[PhenotypeSpec]:
|
|
|
159
162
|
list of PhenotypeSpec
|
|
160
163
|
A single ``self`` ``ParamsSpec`` with one field of each domain kind (and one fixed
|
|
161
164
|
field); a single ``self`` acyclic XOR-like ``NetworkSpec`` with a bounded
|
|
162
|
-
``number_of_hidden_nodes``; the same network, recurrent and without bound
|
|
165
|
+
``number_of_hidden_nodes``; the same network, recurrent and without bound; a recurrent
|
|
166
|
+
network with two outputs that feed nothing (``sink_outputs``) and a bounded
|
|
167
|
+
``number_of_hidden_nodes``.
|
|
163
168
|
|
|
164
169
|
Notes
|
|
165
170
|
-----
|
|
@@ -179,4 +184,8 @@ def reference_specs() -> list[PhenotypeSpec]:
|
|
|
179
184
|
node_attributes=nodes, edge_attributes=edges, recurrent=False)
|
|
180
185
|
unbounded = NetworkSpec(inputs=("a", "b"), outputs=("y",), node_attributes=nodes,
|
|
181
186
|
edge_attributes=edges, recurrent=True)
|
|
182
|
-
|
|
187
|
+
sink = NetworkSpec(inputs=("a", "b"), outputs=("y", "z"), number_of_hidden_nodes=Integer(0, 4),
|
|
188
|
+
node_attributes=nodes, edge_attributes=edges, recurrent=True,
|
|
189
|
+
sink_outputs=True)
|
|
190
|
+
return [PhenotypeSpec(params), PhenotypeSpec(bounded), PhenotypeSpec(unbounded),
|
|
191
|
+
PhenotypeSpec(sink)]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|