[Workflow Interface]: Refactoring FLSpec and Runtime #3
scngupta-dsp
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SUMMARY
One of the main goals of Workflow API is to clearly separate Workflow definition and Runtime infrastructure. While the current implementation is effective, there is some coupling between
FLSpec
andRuntime
and scope for further improvementThis proposal refines the interaction between
FLSpec
andRuntime
classes, such asLocalRuntime
andFederatedRuntime
to make the design cleaner and more modularMOTIVATION
(Current) High Level Design:
In the example shown above, both
LocalRuntime
andFederatedRuntime
are directly assigned toFLSpec
Instance illustrating how the runtime is integrated (and coupled) with the flow.From the above illustration we can see that runtime is an attribute of
FLSpec
. Whenflflow.run()
is called, the execution flows to the associated runtime, whether it isLocalRuntime
orFederatedRuntime
Potential issues with Current Approach:
Any future changes or enhancements to
Runtime
may need changes toFLSpec
flflow.run()
is a blocking call, preventing users from querying the experiment status or performing other actions while the experiment is running. While it is possible to modify this behavior by passing an argument to indicate whether sync or async execution is desired, changes are required toFLSpec
which should ideally not be the caseRuntime
related features whereFLSpec
may potentially need to be modified are as follows:FLSpec
to user to query the status, retrieve the results and clean experiment dataDirector
support also)PROPOSED APPROACH
(Proposed) High Level Design: To decouple
FLSpec
fromRuntime
, we propose:FLSpec
, the runtime’s run method will accept theFLSpec
instance as an argumentThis approach shall achieve a clean separation of Workflow and Runtimes, aligning with the principles of a well-defined Workflow API. With this approach it should be possible to enhance
Runtime
without impactingFLSpec
TECHNICAL DETAILS
flflow.run()
will need to be updated to use the new run() method in the appropriate runtime classes.KEY BENEFITS
FLSpec
fromRuntime
Runtime
without impactingFLSpec
RISKS
MITIGATION
NEXT STEPS
Beta Was this translation helpful? Give feedback.
All reactions