Repository navigation
feat(core): deduce operator resource inputs from the signature - #1584
michael-johnston wants to merge 2 commits into
Conversation
2763192 to
d90d62d
Compare
d90d62d to
feeb522
Compare
feeb522 to
c475dec
Compare
0829360 to
e018b30
Compare
e018b30 to
268b60a
Compare
268b60a to
403c625
Compare
403c625 to
72789e9
Compare
57d0c03 to
65a1c14
Compare
65a1c14 to
25177a7
Compare
25177a7 to
d7397e4
Compare
d7397e4 to
c181f84
Compare
c181f84 to
8edb9c3
Compare
8edb9c3 to
4d0fb2b
Compare
4d0fb2b to
16242d7
Compare
16242d7 to
9a6bf3e
Compare
|
In this PR need to decide how to handle --with space and --use-latest space c.f. #1248 |
My suggestion would probably be to have a function that finds an input by name and returns the corresponding
Of course, |
|
So to be clear given an operator with inputs but not if you had ? |
|
I would completely deprecate the use of I would require the name of the input to be specified, to keep things simple: The only problem I see with this is how to handle sample stores and actuator configurations, since those aren't "inputs" |
|
So in the example above you'd have seems a bit weird, and yes it won't work with samplestore or actuator configurations (same with with) |
Why?
What if we reserve those keywords? |
Because |
An alternative could be to have: In your example: Here, however, you'd have to make sure the matches that of |
|
Lets step back to why --with and --use-latest exist.
Then because other operators could also take only one space, we could apply (3) to them also. Now we have the problem that this is not true anymore and operators can have multiple resource inputs of multiple types with multiple names. However 1-3 are still true. Basically we have two types of "inputs" to resources; dependencies: The resources an ado resource depends on (all known a priori defined in model) and; payload: the dynamically changing inputs to an operator function. Some choices that gives us: A. We keep use-latest and --with for cases 1-3 which are still valid and don't support other operator types anymore. This keeps the reason these flags exist intact. i.e. use-latest and with are for simplifying creating discoveryspace and explore operations |
|
@AlessandroPomponio Here's a suggestion examples
This is similar to your = idea, but with the The only thing is the |
|
Let's leave --with/--use-latest as it is in this branch. It will work in all cases as before but will fail for operations with multiple space inputs. |
Register each operator's resource parameters from its function, including compare and fuse, and bind CLI inputs by those names. # Conflicts: # ado/core/operation/inputs.py # docs/developer-guide/creating-operators.md
9a6bf3e to
943af84
Compare
Update operator registration to read multiple resources of multiple types from the function.
Stack created with GitHub Stacks CLI • Give Feedback 💬