-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AERIE-1629] Computed Attributes in Simulation Results #25
[AERIE-1629] Computed Attributes in Simulation Results #25
Conversation
merlin-server/src/main/java/gov/nasa/jpl/aerie/merlin/server/http/ResponseSerializers.java
Outdated
Show resolved
Hide resolved
merlin-sdk/src/main/java/gov/nasa/jpl/aerie/merlin/protocol/driver/Scheduler.java
Outdated
Show resolved
Hide resolved
298597d
to
5bff3b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am starting to understand more about this part of AERIE. It is all those walkthroughs you gave me :) Just a general question what are activity computed attributes
? Visually I add BiteBanana
to the plan, simulate, and get back values that affect the graph/resource at the bottom of the plan. Are those values you get back from the simulation activity computed attributes
Maybe we don't have an example yet?
I give this PR a loose approve
someone with more experience can veto this though
...essor/src/main/java/gov/nasa/jpl/aerie/merlin/processor/generator/MissionModelGenerator.java
Outdated
Show resolved
Hide resolved
...essor/src/main/java/gov/nasa/jpl/aerie/merlin/processor/generator/MissionModelGenerator.java
Outdated
Show resolved
Hide resolved
🥳 yay, let's do more of those, for all the different things people are working on
Yeah, sort of. The charter for our working group described it as:
So, what you currently see in the UI is There are some use cases for which this "global" property of resources is inconvenient - if you have multiple overlapping activities affecting the same resource, it can be difficult to discern the behavior of each individual activity. The idea of "activity computed attributes" is that we are allowing an activity to return some arbitrary value upon completion. This value will be included in simulation results alongside other attributes of the activity, such as its input parameters, start time duration, etc.
Correct - I haven't included an example in this PR, perhaps I should. I've been testing by going into Having written that up, I acknowledge that testing this PR is a bit of a pain 😅 . If I have some time later this week I'll see if I can add an example and make it more streamlined. |
@mattdailis thanks for the clarification. This helps a lot!!! |
Would be cool to test this out in an example adaptation like |
...server/src/main/java/gov/nasa/jpl/aerie/merlin/server/services/LocalMissionModelService.java
Outdated
Show resolved
Hide resolved
...processor/src/main/java/gov/nasa/jpl/aerie/merlin/processor/metamodel/EffectModelRecord.java
Outdated
Show resolved
Hide resolved
merlin-sdk/src/main/java/gov/nasa/jpl/aerie/merlin/protocol/model/TaskSpecType.java
Outdated
Show resolved
Hide resolved
5bff3b3
to
43239aa
Compare
merlin-sdk/src/main/java/gov/nasa/jpl/aerie/merlin/protocol/types/ValueSchema.java
Outdated
Show resolved
Hide resolved
43239aa
to
66a7b7e
Compare
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/engine/SimulationEngine.java
Outdated
Show resolved
Hide resolved
...ramework-processor/src/main/java/gov/nasa/jpl/aerie/merlin/processor/MissionModelParser.java
Outdated
Show resolved
Hide resolved
merlin-server/src/test/java/gov/nasa/jpl/aerie/merlin/server/mocks/StubMissionModelService.java
Outdated
Show resolved
Hide resolved
merlin-server/src/main/java/gov/nasa/jpl/aerie/merlin/server/models/ActivityType.java
Outdated
Show resolved
Hide resolved
merlin-server/src/test/java/gov/nasa/jpl/aerie/merlin/server/mocks/StubMissionModelService.java
Outdated
Show resolved
Hide resolved
merlin-server/src/test/java/gov/nasa/jpl/aerie/merlin/server/mocks/StubMissionModelService.java
Outdated
Show resolved
Hide resolved
...in/java/gov/nasa/jpl/aerie/merlin/server/remotes/postgres/PostgresResultsCellRepository.java
Outdated
Show resolved
Hide resolved
...rc/main/java/gov/nasa/jpl/aerie/merlin/server/remotes/postgres/ActivityAttributesRecord.java
Outdated
Show resolved
Hide resolved
...rc/main/java/gov/nasa/jpl/aerie/merlin/server/remotes/postgres/CreateActivityTypeAction.java
Outdated
Show resolved
Hide resolved
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/SimulationDriver.java
Outdated
Show resolved
Hide resolved
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/engine/SimulationEngine.java
Outdated
Show resolved
Hide resolved
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/engine/SimulationEngine.java
Outdated
Show resolved
Hide resolved
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/engine/SimulationEngine.java
Outdated
Show resolved
Hide resolved
merlin-framework/src/main/java/gov/nasa/jpl/aerie/merlin/framework/ModelActions.java
Outdated
Show resolved
Hide resolved
merlin-framework/src/main/java/gov/nasa/jpl/aerie/merlin/framework/ModelActions.java
Outdated
Show resolved
Hide resolved
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/MissionModelBuilder.java
Show resolved
Hide resolved
53ee9e8
to
12a2b2a
Compare
I might not be able to re-review, so feel no need to wait on me 😃 If you've addressed what you think you need to address, 🚀 |
span is meant to be general, and does not necessarily correspond with activity instances. The comment on type says "The type of span, implying the shape of its attributes." There isn't much need to limit attributes to merlin_argument_set.
12a2b2a
to
e12d2db
Compare
Final force-push was a minor field-name change from "ActivityType.returnValueSchema" to "ActivityType.computedAttributesValueSchema". Thanks for all the feedback and numerous iterations, everyone! I think we're in a significantly better place than we were when I first opened this. Looking forward to the possibilities this change opens up in the future 🚀 Merging now. |
Description
I've taken #17 and split it into three branches. I'll PR them sequentially, so we can focus on one at a time.
EDIT: If it would help declutter, I can make a separate PR for the refactoring commits. Let me know if anyone would prefer that.
The focus of this PR is reporting a value as part of simulation results upon completion of an activity instance.
The commits in this PR fall into one of the following phases
We continue to support
void
return types as before. These activities will have aSerializedValue.UNIT
return value.Verification
I've done some simple manual testing by giving BiteBanana a non-void return type and viewing it via hasura. Some more thorough verification is needed prior to merging.
Documentation
This work is part of the Activity Computed Attributes working group: https://wiki.jpl.nasa.gov/display/MPSA/Working+Group%3A+Activity+Computed+Attributes
Future work
Step 2: (AERIE-1630) Make this value available to the caller
Step 3. (AERIE-1631) Tag events with activity ids