Computational path resolution #71
Replies: 2 comments
-
|
This is another thing I wrote about it, in a section of the Ideas wiki, having forgotten that I already had devoted a whole wiki to it. Path findersThis digraph doesn't represent a DAG computation. In fact, it's not a DAG since it has a directed cycle! Instead here each node represents a variable kind and an edge represents a function that can transform/compute one kind from another. The general object illustrated here is one that relates sets of variable kinds to other ones. The intended use of such an object is to allow a user to get one set of variables from another set of variables without having to manually specify how to do so. For example, a user can specify that they need to have the Note as well that this object can have cycles: Here, we may want to save some One typical application of such path finder object arises when we want to overload a function to "Postelize" it, enabling it to handle several types of inputs. For example, our function could have a
|
Beta Was this translation helpful? Give feedback.
-
Known applications
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The original idea of
meshedis to offer tools to combine python objects to create new ones. Of course, pipelines (function composition) and DAGs (generalization thereof) are examples of this, andmeshedoffers not much more than this at the time of writing this. It's intention though, is to offer much more: Including making classes (such as bind_func_object_attrs in i2), caching, etc.An underlying problem to enable the destiny of
meshedis "path finding" or more precisely "computational path resolution".The problem is related to
DAGslicing. Given adagand a tuple of input and output identifiers,dag[inputs:outputs]is a dag that gets us from the desiredinputsto the desiredoutputs-- more precisely, it's a callable that let's us computeoutputsfrom the giveninputs.This is a special case of computational path resolution but for a DAG. We want the same but for any collection of objects (along with connectivity information). One instance of this would be if all these objects are DAGs themselves, sharing some identifiers...
For this particular instance, one might think of providing an interface such as
get_result(src, src_type)orget_result(src)wheresrcwould act aswf,filepathormic_idandget_resultwould do what is necessary to get the result.This interface is a good one, but that's not the question here: The question is what the architecture of
get_resultitself is. How can we cleanly "create" it from the pieces we have (i.e. the function that gets results fromwf, the one fromfilepathtowf, and the one frommic_idtowf).Verify architecture ideas against the following considerations:
get_resultto handle a different source, or enable the user to extend?get_resultis warranted. For example, aModelclass that might have three methods:wf_to_result,filepath_to_resultandmic_id_to_result? Can we reuse the same combinator tools we used for theget_result(src, src_type)function?Note the relationship with
Proposal
In a nutshell, we want a
mk_funcso that, given a collection ofobjs(that somehow contains information on how these can be combined to create computational paths) and a specification of what the inputs and outputs should be,is a function that uses objs internally to computationally connect the said inputs and outputs.
These input and output specifications can be expressed as identifiers, or types, or whatever.
An instance of this is where the
objsare all DAGs that share some identifiers. We use these identifiers to identifier what combination of these DAGs (or possibly sub-dag of these) we need to connect the desired inputs to the outputs.Appendix: DAGs used above
Beta Was this translation helpful? Give feedback.
All reactions