Where above $.input is a dict containing an arbitrary number of keys. In funcx 0.0.5, this worked fine. The function would simply get a giant dict blob in data and sort through the input it needed for whatever it was doing. In funcx 0.2.4+ this no longer works and args must be specified explicitly. For instance, if the contents of $.input is {'foo': 1, 'bar': 2, 'baz': 3}, the function signature must look like the following:
Long term, it would be ideal if we could leverage Flows to supply specific arguments to funcx functions. Currently, we rely on tools to specify foo, bar, or baz arguments, but this is currently a manual process and does not use the Flows Service for argument checking. For example, if function.$ returns a null value above, the entire function and flow will fail in an unrecoverable way. To prevent these failures, the Flows service uses json schema to protect against bad input. Ideally, Gladier could introspect the function signature of myfunction above, pull out the three arguments, and write up json schema for each of them. Ideally, flows with FuncX functions could not fail due to malformed inputs.
Classical functions in FuncX look like this:
Where the Automate flow definition would look like this:
Where above
$.input
is a dict containing an arbitrary number of keys. In funcx0.0.5
, this worked fine. The function would simply get a giant dict blob indata
and sort through the input it needed for whatever it was doing. In funcx0.2.4+
this no longer works and args must be specified explicitly. For instance, if the contents of$.input
is{'foo': 1, 'bar': 2, 'baz': 3}
, the function signature must look like the following:Long term, it would be ideal if we could leverage Flows to supply specific arguments to funcx functions. Currently, we rely on tools to specify
foo
,bar
, orbaz
arguments, but this is currently a manual process and does not use the Flows Service for argument checking. For example, iffunction.$
returns a null value above, the entire function and flow will fail in an unrecoverable way. To prevent these failures, the Flows service uses json schema to protect against bad input. Ideally, Gladier could introspect the function signature ofmyfunction
above, pull out the three arguments, and write up json schema for each of them. Ideally, flows with FuncX functions could not fail due to malformed inputs.