Sxnan commented on code in PR #311:
URL: https://github.com/apache/flink-agents/pull/311#discussion_r2525890352
##########
python/flink_agents/runtime/local_runner.py:
##########
@@ -122,6 +128,18 @@ def get_action_config_value(self, key: str) -> Any:
action_name=self.action_name, key=key
)
+ @property
+ @override
+ def sensory_memory(self) -> MemoryObject:
+ """Get the short-term memory object associated with this context.
Review Comment:
```suggestion
"""Get the sensory memory object associated with this context.
```
##########
python/flink_agents/api/runner_context.py:
##########
@@ -81,6 +81,17 @@ def get_action_config_value(self, key: str) -> Any:
The config option value.
"""
+ @property
+ @abstractmethod
+ def sensory_memory(self) -> "MemoryObject":
+ """Get the sensory memory.
Review Comment:
Need detailed documentation like Java API
##########
api/src/main/java/org/apache/flink/agents/api/context/MemoryRef.java:
##########
@@ -47,12 +47,12 @@ public static MemoryRef create(String path) {
/**
* Resolves the reference using the provided RunnerContext to get the
actual data.
*
- * @param ctx The current execution context, used to access Short-Term
Memory.
+ * @param memory The memory this ref based on.
* @return The deserialized, original data object.
* @throws Exception if the memory cannot be accessed or the data cannot
be resolved.
*/
- public MemoryObject resolve(RunnerContext ctx) throws Exception {
- return ctx.getShortTermMemory().get(this);
+ public MemoryObject resolve(MemoryObject memory) throws Exception {
Review Comment:
Where is this method used? Is it only used in test case?
##########
api/src/main/java/org/apache/flink/agents/api/context/RunnerContext.java:
##########
@@ -37,6 +37,14 @@ public interface RunnerContext {
*/
void sendEvent(Event event);
+ /**
+ * Gets the sensory memory.
Review Comment:
We should have a detailed explanation about the sensory memory. When to use
sensory memory vs short-term memory
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]