wenjin272 commented on code in PR #126:
URL: https://github.com/apache/flink-agents/pull/126#discussion_r2309699624


##########
python/flink_agents/runtime/local_execution_environment.py:
##########
@@ -54,6 +54,10 @@ def apply(self, agent: Agent) -> AgentBuilder:
         if self.__runner is not None:
             err_msg = "LocalAgentBuilder doesn't support apply multiple 
agents."
             raise RuntimeError(err_msg)
+        # inspect resources from environment to agent instance.
+        registered_resources = self.__env.resources
+        for type, name_to_resource in registered_resources.items():
+            agent.resources[type] = name_to_resource | agent.resources[type]

Review Comment:
   Currently, the compile from Agent to AgentPlan must apply before 
to_datastream/to_table, because construct the output datastream/table depend on 
transferring AgentPlan from Python to Java. Thus, we can't do this in 
env.execute, for AgentPlan is already generate and we can't inspect registered 
any more. Should we do this in to_datastream?



-- 
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]

Reply via email to