Skip to content

Commit

Permalink
run.py: allow process_metadata to return artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Apr 11, 2024
1 parent 8036b3f commit aea3130
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mlonmcu/session/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,15 @@ def load(self):
# The following is very very dirty but required to update arena sizes via model metadata...
cfg_new = {}
if isinstance(self.model, Model):
self.frontend.process_metadata(self.model, cfg=cfg_new)
artifacts_ = self.frontend.process_metadata(self.model, cfg=cfg_new)
if artifacts_ is not None:
if isinstance(artifacts, dict):
assert "default" in artifacts.keys()
artifacts["default"].extend(artifacts_)
# ignore subs for now
else:
assert isinstance(artifacts, list)
artifacts.extend(artifacts_)
if len(cfg_new) > 0:
for key, value in cfg_new.items():
component, name = key.split(".")[:2]
Expand Down

0 comments on commit aea3130

Please sign in to comment.