math-spec-mapping 0.3.21__tar.gz → 0.4.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {math_spec_mapping-0.3.21/src/math_spec_mapping.egg-info → math_spec_mapping-0.4.0}/PKG-INFO +1 -1
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/pyproject.toml +1 -1
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/MathSpec.py +29 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/github.py +9 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0/src/math_spec_mapping.egg-info}/PKG-INFO +1 -1
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/LICENSE +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/README.md +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/setup.cfg +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/ActionTransmissionChannel.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Block.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/BoundaryAction.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/ControlAction.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Entity.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Mechanism.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Metric.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Parameter.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Policy.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Space.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/State.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/StateUpdateTransmissionChannel.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/StatefulMetric.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Type.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/__init__.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/__init__.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/documentation.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/starter.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/__init__.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/action_transmission_channel.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/boundary_actions.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/control_actions.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/displays.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/entities.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/general.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/implementations.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/load.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/mechanism.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/metrics.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/parameters.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/policy.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/spaces.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/spec_tree.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/state_update_transmission_channels.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/stateful_metrics.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/states.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/type.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/wiring.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/__init__.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/boundary_actions.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/control_actions.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/general.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/html.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/markdown.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/mechanisms.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/node_map.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/parameters.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/policies.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/spaces.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/state.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/tables.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/wiring.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/__init__.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/schema.py +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/schema.schema.json +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/SOURCES.txt +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/dependency_links.txt +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/requires.txt +0 -0
- {math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/top_level.txt +0 -0
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/MathSpec.py
RENAMED
@@ -727,11 +727,13 @@ class MathSpec:
|
|
727
727
|
state_preperation_functions=None,
|
728
728
|
parameter_preperation_functions=None,
|
729
729
|
metrics_functions=None,
|
730
|
+
append_param_change_columns=False,
|
730
731
|
):
|
731
732
|
state_l = []
|
732
733
|
params_l = []
|
733
734
|
df_l = []
|
734
735
|
metrics_l = []
|
736
|
+
param_mods = set()
|
735
737
|
for experiment in experiments:
|
736
738
|
for i in range(experiment["Monte Carlo Runs"]):
|
737
739
|
state, params, msi, df, metrics = self.run_experiment(
|
@@ -743,6 +745,11 @@ class MathSpec:
|
|
743
745
|
parameter_preperation_functions=parameter_preperation_functions,
|
744
746
|
metrics_functions=metrics_functions,
|
745
747
|
)
|
748
|
+
if append_param_change_columns:
|
749
|
+
if experiment["Param Modifications"]:
|
750
|
+
for key in experiment["Param Modifications"]:
|
751
|
+
df[key] = experiment["Param Modifications"][key]
|
752
|
+
param_mods.add(key)
|
746
753
|
df["Monte Carlo Run"] = i + 1
|
747
754
|
df["Experiment"] = experiment["Name"]
|
748
755
|
metrics.loc["Monte Carlo Run"] = i + 1
|
@@ -753,6 +760,9 @@ class MathSpec:
|
|
753
760
|
df_l.append(df)
|
754
761
|
metrics_l.append(metrics)
|
755
762
|
df = pd.concat(df_l)
|
763
|
+
if append_param_change_columns:
|
764
|
+
for key in param_mods:
|
765
|
+
df[key] = df[key].fillna(params_base[key])
|
756
766
|
metrics = pd.concat(metrics_l, axis=1).T
|
757
767
|
return df, metrics, state_l, params_l
|
758
768
|
|
@@ -1022,6 +1032,12 @@ class MathSpecImplementation:
|
|
1022
1032
|
), "No functional parameterization for {}. To fix this error, add {} to the parameters passed to ms.build_implementation. Option can be: {}".format(
|
1023
1033
|
ca.name, "FP " + ca.name, [x.name for x in opts]
|
1024
1034
|
)
|
1035
|
+
assert (
|
1036
|
+
self.params["FP {}".format(ca.name)]
|
1037
|
+
in self.ms.functional_parameters["FP {}".format(ca.name)]
|
1038
|
+
), "{} is not a valid functional parameterization for {}".format(
|
1039
|
+
self.params["FP {}".format(ca.name)], ca.name
|
1040
|
+
)
|
1025
1041
|
opt = self.ms.functional_parameters["FP {}".format(ca.name)][
|
1026
1042
|
self.params["FP {}".format(ca.name)]
|
1027
1043
|
]
|
@@ -1061,6 +1077,13 @@ class MathSpecImplementation:
|
|
1061
1077
|
ba.name, "FP " + ba.name, [x.name for x in opts]
|
1062
1078
|
)
|
1063
1079
|
|
1080
|
+
assert (
|
1081
|
+
self.params["FP {}".format(ba.name)]
|
1082
|
+
in self.ms.functional_parameters["FP {}".format(ba.name)]
|
1083
|
+
), "{} is not a valid functional parameterization for {}".format(
|
1084
|
+
self.params["FP {}".format(ba.name)], ba.name
|
1085
|
+
)
|
1086
|
+
|
1064
1087
|
opt = self.ms.functional_parameters["FP {}".format(ba.name)][
|
1065
1088
|
self.params["FP {}".format(ba.name)]
|
1066
1089
|
]
|
@@ -1165,6 +1188,12 @@ class MathSpecImplementation:
|
|
1165
1188
|
), "No functional parameterization for {}. To fix this error, add {} to the parameters passed to ms.build_implementation. Option can be: {}".format(
|
1166
1189
|
p.name, "FP " + p.name, [x.name for x in opts]
|
1167
1190
|
)
|
1191
|
+
assert (
|
1192
|
+
self.params["FP {}".format(p.name)]
|
1193
|
+
in self.ms.functional_parameters["FP {}".format(p.name)]
|
1194
|
+
), "{} is not a valid functional parameterization for {}".format(
|
1195
|
+
self.params["FP {}".format(p.name)], p.name
|
1196
|
+
)
|
1168
1197
|
opt = self.ms.functional_parameters["FP {}".format(p.name)][
|
1169
1198
|
self.params["FP {}".format(p.name)]
|
1170
1199
|
]
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/github.py
RENAMED
@@ -92,6 +92,15 @@ def create_milestone_label_matrix(df, exclude_milestones=None):
|
|
92
92
|
labels = list(df.columns[4:])
|
93
93
|
labels = sorted([x for x in labels if x not in priority_labels])
|
94
94
|
milestones = sorted(list(df[~pd.isnull(df["Milestone"])]["Milestone"].unique()))
|
95
|
+
try:
|
96
|
+
milestones = sorted(
|
97
|
+
milestones,
|
98
|
+
key=lambda x: int(x.split(".")[0][1:]) * 10000
|
99
|
+
+ int(x.split(".")[1]) * 100
|
100
|
+
+ int(x.split(".")[2]),
|
101
|
+
)
|
102
|
+
except:
|
103
|
+
pass
|
95
104
|
|
96
105
|
table = []
|
97
106
|
for label in labels:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/BoundaryAction.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/ControlAction.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Entity.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Mechanism.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Metric.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Parameter.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/Policy.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/StatefulMetric.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Classes/__init__.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/__init__.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Convenience/starter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/boundary_actions.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/control_actions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/implementations.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/mechanism.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/parameters.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/spec_tree.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Load/stateful_metrics.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/general.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/markdown.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/mechanisms.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/node_map.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/parameters.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/policies.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/spaces.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/tables.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/Reports/wiring.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping/schema.schema.json
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/requires.txt
RENAMED
File without changes
|
{math_spec_mapping-0.3.21 → math_spec_mapping-0.4.0}/src/math_spec_mapping.egg-info/top_level.txt
RENAMED
File without changes
|