njwilson23 / depgraph Goto Github PK
View Code? Open in Web Editor NEWDependency resolution for datasets
License: MIT License
Dependency resolution for datasets
License: MIT License
DependencyGraph methods should be able to detect cases in which dependencies are circular, as in
graph.add_relation(a, (b,))
graph.add_relation(b, (c,))
graph.add_relation(c, (a,))
or even
graph.add_relation(a, (a, b, ...)
In this case, probably makes sense to raise something like a CircularDependencyError
exception.
Line 331 in e73dfdf
...
i, dep = queue.pop(0)
marks[dep] = i
...
Otherwise I'm not seeing any code that would produce items that don't have any parents?
Simple code:
from depgraph import Dataset, buildall
parent = Dataset('parent-does-not-exists', tool=None)
child = Dataset('child-does-not-exists', tool=None)
child.dependson(parent)
for stage in buildall(child):
for dep, reason in stage:
print("Building {0} with {1} because {2}".format(dep.name, dep.tool, reason))
Output only builds child, not the parent:
Building child-does-not-exists with None because the dataset doesn't exist
This is critical. Parallel builds should permit datasets that require a build and don't depend on each other to be constructed at once. This might work by having a DependencyGraph.parallel_needsbuild
method that returns lists of Dependencies that can be built. Alternatively, could try something concurrent where a channel is filled with eligible builds as the dependency graph is traversed.
It is probably best to leave resource allocation to the function managing the build, but each dependency could have an attribute specifying the number of threads that can be used to build it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.