- GitHub Releases
FEAT(compose): a current-working-document given when defining operation prefixes its non-root dependencies as jsonp expressions.
feat(plot): color as “pink” any
Nones in the results, to facilitate identification of operations returning nothing, by mistake, or non-produced implicits. Include “shape” when printing vectors (np-arrays and data-frames).
refact/feat(exe): the argument to callbacks now contains the results; replace
OpCbclass with pre-existing
Calllbacks are now called from solution context, before marshalling.
ENH(solution): preserve index/column names when concatenating pandas (workaround https://github.com/pandas-dev/pandas/issues/13475, to be fixed with pandas-v1.2).
sol.update()supports jsonps, and applies them grouped, to avoid resolving paths repeatedly.
doc(api): add forgotten jsonpointer module; updated module-dependencies diagram
FEAT(solution+jsonp)): can extend in place pandas (dataframes & series) horizontally/vertically with pandas concatenation. Usefull for when working with Pandas advanced indexing. or else, sideffecteds are needed to break read-update cycles on dataframes.
_layerssolution-attribute, role passed to (existing)
FEAT(execution): support also post-callbacks.
FEAT: parse string explicitly passed in
jsonp=...argument in modifiers.
feat(modifier+fnop): keep just the last part of a keyword+jsonp dependency, to save an explicit conversion (jsonps are invalid as python-identifiers).
break(modifier+fnop): forbid implicit term:sfxed – hard to find a solid use-case, pure sfx would be preferable in that case.
fix: forbid aliasing implicits – they wouldn’t work anyway.
enh(compose): check for node type collisions (i.e. a dependency name clashing with some operation name).
FIX(PLOT): passing simple dictionaries into
enh(plot): use also a different label (not only format) to distinguish sfx/sfxed in plots.
v10.2.0 (16 Sep 2020, @ankostis): RECOMPUTE, pre-callback, drop op_xxx, ops-eq-op.name, drop NULL_OP¶
Should have been a “major” release due to x2 API-BREAKs not that important.
FEAT(pipeline+execution): add term
pre_callbackto be invoked prior to computing each operation (see
FEAT(pipeline+plan): can recompute modified solutions, partial or complete – The
recompute_from=<dep / list-of-deps>argument has been added to
REFACT/break(OP): replace badly-specified public attributes
FnOp._user_provides– now it must be easier to inherit
Operationanew (but) UNTESTED :-().
refact: don’t crash of operations lacking
namestring compare equal – that is, dictionaries of operations, such as
Solution.executed, can be indexed with their names (note, they didn’t equal by accident).
FnOp.__hash__()/__eq__()up, to Operation class.
NULL_OPoperation a new
compose(excludes=..)argument, in order to delete existing operations when merging pipelines.
FIX(PLAN): compile cache was ignoring(!) the state of the eviction flag.
copy()was crashing (for 9 months till now).
ENH(plot): make all nodes “filled” to facilitate hovering for tooltips.
fix(plot): “overwrite” tooltip was written “overridden”.
fix(plan): bug when printing a list of “unsolvable graph” error-message.
exe_methodwas always empty when interrogated for deciding “xfail”s.
blackversion, changes in format affect commits.
doc(parallel): Deprecate(!), but just in docs, in favor of always producing a list of “parallelizable batches”, to fed to 3rdp parallelizing executors.
doc(execution+fnop): Mark mark
execution.task_contextas unstable API, in favor of supporting a specially-named function argument to receive the same instances.
doc(site+doctests): use greek letters in algebraic formulas AND dependencies.
fix: rescheduled function err-msg were listing wrong missing provides.
enh: err-msg did not list returns-dict mismatches.
ENH(plot): add number badges on operations & data nodes to denote execution order; theme
show_steps=Falsecan hide them;
feat: data-nodes are Graphviz HTML-ized to support badges.
break(fnop): do not accept operations without any provides - they were pruned before, but it is better to fail asap.
fix/break: clip extra data from a returns dictionary function - previously, full-eviction assertion was kicking.
enh(plan): why operations are pruned is now explained in the plan & the plot tooltips.
ExecutionPlan.validate()may be called with no args, and uses the compiled ones.
enh: suggest mode of action on the error message, when graph has cycles; top-sort nodes only once, and report them to jetsam (see below).
doc: enhance existing tutorial section to explain compilation.
feat(jetsam): pipeline was not collected, till now.
FEAT: items can be accessed as jetsam attributes (helpful for interactive REPLs).
ENH: don’t “catch” exception, use
okflag instead, not to corrupt the landing position of a post-mortem debugger.
feat: now collecting also
revert: stop logging every jetsam item on each salvaging point, not to flood logs (which had been introduced in the previous release).
refact: move into own module.
fix(SphinxExt): catch top-level errors that if occurred, message and stack trace were lost.
doc: list anti-features (when to avoid using this lib).
v10.0.0 (19 Jul 2020, @ankostis): Implicits; modify(); auto-name pipelines; plot data as overspilled¶
FEAT(pipeline): auto-derive name from enclosing function.
BREAK/fix(modifier): rename modifier
FEAT(jspoint): descend object attributes were disabled before.
ENH(modifier): privatize all fields (str with foreign attributes interact badly with 3rdp libs).
ENH(plot): stackable tooltips; now data nodes kind and state is fully explained there.
enh: split jsonp data nodes in separate lines forming a tree.
enh: label overspill data-node’s shapes.
enh: theme-stack now expands any callables in keys or whole kv-pairs.
show_chaindocs=Falsethem attribute now hides even subdoc relationships (edges).
fix: various fixes & enhancements (“canceled” were misattributed, update legend, infective user
'graphviz.xxx"attributes, plotting no-edge diagrams)
enh(planning): explained why nodes were pruned in
enh(jetsam): exception-annotated contents accessed also as attributes.
doc(debug) improve instructions.
enh(tests): check library also with
FIX/FEAT(SPHINXEXT): so far,
operation()-annotated module functions were excluded from generated sites. Until the installed autodoc function-documenter was instructed how to render the wrapped function in place of the wrapping
fix(fnop, pipeline): wrapped function attributes are conveyed to wrapping FnOp.
FIX(plot): sideffect templates were left broken by recent privatization of modifier fields; add x2 Jinja-filters encapsulating the access to these fields.
fix(op): fully fake callables by attaching a
__qualname__property on operations; also teach
func_name()not to choke if
Delayed raising of needs errors hindered debug.
BREAK(modifier): privatize all
_Modifierproperties; it is uncanny for a str to have more public attributes.
fix: avoid equality checks on results, to avoid pandas notorious “The truth value of a Series/DataFrame is ambiguous.”
break(plot): Rename theme property
include_steps => show_steps.
feat(plot): new theme property
show_chaindocsby default false, that when enabled, plots all nodes in the subdoc hierarchy (even if those not used as deps), like this:
fix(plot): returns-dictionary op-badge had broken url.
set_layered_solution()into configurations which when True (or jsonps in the network if None (default)) all results are stored in the given inputs to the pipeline (this may become the regular behavior in the future).
feat(modifier, solution): +modifier with accessor functions to read/write Solution.
doc: new section Hierarchical data and further tricks putting together all advanced features of the project in a “Weekly task runner”.
BREAK/REFACT: modules and objects renamed:
identity_function()acting as conveyor operation.
FIX(NET, EXECUTION): discovered and fixed bugs in pruning, evictions and rescheduling with overwrites, while testing new jsonp modifier; rely on dag alone while pruning (and not digging into op needs/provides).
Dupe Evictions of pruned output were deliberately & wrongly consolidated, while it is possible to need to evict repeatedly the same out from multiple ops providing it.
Less aggressive prune-isolated-data permits SFX not to be asked explicitly, and behave more like regular data. Now For certain cases, the more specific error “Unreachable out” gets raised, instead of the too generic “Unsolvable graph”.
Prune-by-outputs was ignoring given inputs, chocking on computation cycles that were possible to avoid!
_EvictionInstructionclass was obscuring modifier combinations, and it didn’t make sense any more, being the only instruction.
FEAT(ops, pipelines, net, sol): unified
ENH: Error reporting:
enh(op, pipe): fail earlier if no function/name given when defining operations and pipelines.
GRAPHTIK_DEBUGvar defined, any errors during inputs/needs matching are raised immediately.
enh: improve tips & hints in exception messages; log past executed operations when a pipeline fails.
DOC(op): table explaining the differences between various dependency attributes of
Differences between various dependency operation attributes:
“dupes=no” means the collection drops any duplicated dependencies
sfxed('A', 'a', 'b') ==> sfxed('A', 'b'), sfxed('A', 'b')
sfxed('A', 'a', 'b') ==> sfx('a'), sfxed('b')
enh(op, pipe): restrict operation names to be strings (were
modifier_withset()to produce modified clones – handle it with care.
feat(doc): Add new section with most significant Features of this project.
fix(travis): update pytest or else pip-install chokes with pytest-coverage plugin.
--logger-disabledCLI option when running TCs, as explained in pytest-dev/pytest#7431.
refact(tests): split big
test/test_graphtik.pyTC file into multiple ones, per functionality area (features).
ENH(pipe): nest all Ops (not just FnOps), dropping
FnOpdependency in network code, to allow for further sub-classing
FIX(pipeline): due to a side-effect on a
kwdictionary, it was mixing the attributes of earlier operations into later ones while merging them into pipelines.
REFACT(solution): facilitate inheriting Solution by extracting :meth:` .Solution._update_op_outs` into a separate method.
refact(pipe): move build_net() –> back to pipeline module, dropping further network.py–>pipeline.py mod-dep.
enh(plot): StyleStack-ize data-io shape selection into separate theme-able dicts.
DOC(exe, plotting): task-context section in Debugger
ENH(plot): have all the link-edges between data and operations route out and into the same point on the nodes (src: south, dst: north). Distinguish needs edges from provides with a “dot”.
mapped --> keyword, which conveys the mot important meaning.
DROP Solution.finalized() method – has stopped being used to reverse values since sfxed have been introduced (v7+).
doc(modifiers): explain diacritic symbols of dependencies when in printouts.
compute()supports custom Solution classes.
FEAT(exe): underlying functions gain access to wrapping Operation with
DROP(pipeline): After solution class was introduced,
last_planattribute was redundant.
ENH(op): Rename & Nest operations with dictionary or callable.
NO_RESULT_BUT_SFXtoken can cancel regular data but leave sideffects of a rescheduled op.
REFACT: revert module splits and arrive back to
pipeline.py, to facilitate development with smaller files, but still with very few import-time dependencies.
Importing project composition classes takes less than 4ms in a fast 2019 PC (down from 300ms).
FIX(plot): updated Legend, which had become outdated since v6+.
fix(modifiers): dep_renamed() was faking sideffect-renaming only on repr() (but fix not stressed, bc v8.0.x is not actually released).
enh(pipe): accept a dictionary with renames when doing operation nesting (instead of callables or truthies).
_Modifier.cmdwith code to reproduce modifier.
v8.0.2 (7 May 2020, @ankostis): re-MODULE; sideffect –> sfx; all DIACRITIC Modifiers; invert “merge” meaning¶
–((superseded immediately v8.0.1 & v8.0.2 with more restructurings)))–
ENH: change visual representation of modifiers with DIACRITICS only.
ENH: possible to rename also sideffects; the actual sideffect string is now stored in the modifier.
BREAK/ENH: invert “merge” meaning with (newly introduced) “:term:”nest <operation nesting>`”; default is now is merge:
FEAT: introduce the
NULL_OPoperation that can “erase” an existing operation when merging pipelines.
compose(..., nest=nest_cb)where the callback accepts class
.RenArgsand can perform any kind of renaming on data + operations before combining pipelines.
doc: “merge” identically-named ops override each other, “nest” means they are prefixed, “combine” means both operations.
DOC: re-written a merge-vs-nest tutorial for humanity.
DROP(op): parent attribute is no longer maintained – operation identity now based only on name, which may implicitly be nested by dots(
ENH(plot): accept bare dictionary as theme overrides when plotting.
doc: fix site configuration for using the standard
<s5defs>include for colored/font-size sphinx roles.
–((all changes above in b8.0.2 happened actually in these 2 releases))–
Actually it contains just what was destined for v7.1.1.
FIX(op): v7.0.0 promise that
compute()was a fake; now it is fixed.
fix(config): endurance flags were miss-behaving.
refact(net): factor out a
_reschedule()method for both endurance & rescheduled ops.
feat(build): +script to launch pytest on a local clone repo before pushing.
(removed from PyPi/RTD, new features by mistake were removed from v7.1.2)
Should have been a MAJOR BUMP due to breaking renames, but just out of another 6.x –> 7.x major bump.
FIX: rescheduled operations were not canceling all downstream deps & operations.
FEAT: Cancelable sideffects: a reschedules operation may return a “falsy” sideffect to cancel downstream operations.
NO_RESULTconstant cancels also sideffects.
ENH(OP): more intuitive API,
compute()may be called with no args, or a single string as outputs param. Operation’s
__call__now delegates to
compute()- to quickly experiment with function, access it from the operation’s
BREAK: renamed modifiers
sol_sideffect --> sideffected, to reduce terminology mental load for the users.
ENH: support combinations of modifiers (e.g. optional sideffects).
REFACT: convert modifiers classes –> factory functions, producing
_Modifierinstances (normally not managed by the user).
ENH: Theme-ize all; expand callables (beyond Refs and templates).
break: pass verbatim any nx-attrs starting with
'graphviz.'into plotting process (instead of passing everything but private attributes).
break: rename graph/node/edge control attributes:
_no_plot --> no_plot.
_alias_of --> alias_of.
FEAT: draw combined pipelines as clusters
enh: corrected and richer styles for data nodes.
enh: unify op-badges on plot with diacritics in their string-representation.
ENH(sphinxext): clicking on an SVG opens the diagram in a new tab.
fix(sphinxext): don’t choke on duplicate
fix(sphinxext): fix deprecation of sphinx
ValueErrorwherever it must.
DOC(operations): heavily restructured chapter - now might stand alone. Started using the pipeline name more often.
doc: use as sample diagram in the project opening an “endured” one (instead of an outdated plain simple on).
doc: renamed document:
composition.py --> pipelines.py
BREAK: stacking of solution results changed to the more natural “chronological” one (outputs written later in the solution override previous ones).
Previously it was the opposite during execution while reading intermediate solution values (1st result or user-inputs won), and it was “reversed” to regular chronological right before the solution was finalized.
FEAT(op, netop): add
__name__attribute to operations, to disguise as functions.
Specifically the last empty call at the end
()is not needed (or possible):
became simply like that:
_DataNodeand use str + modifier-classes as data-nodes;
BREAK: rename arg –> mapped`, which conveys the correct meaning.
FEAT: Introduced :term`sideffected`s, to allow for certain dependencies to be produced & consumed by function to apply “sideffects, without creating “cycles”:
FnOp, used when matching Inps/Outs and when pruning graph.
FEAT(op): print detailed deps when DEBUG enabled.
ENH: recursively merge Graphviz-styles attributes, with expanding jinja2-template and extending lists while preserving theme-provenance, for debugging.
BREAK: rename class & attributes related to
Style --> Theme, to distinguish them from styles (stacks of dictionaries).
UPD: dot no plot Steps by default; use this Plot customizations to re-enable them:
FEAT: now operations are also plottable.
FEAT: Operation BADGES to distinguish endured, rescheduled, parallel, marshalled, returns_dict.
FIX: Cancel/Evict styles were misclassified.
feat(plot): change label in sol_sideffects; add exceptions as tooltips on failed operations, etc.
enh: improve plot theme, e.g. prunes are all grey, sideffects all blue, “evictions” are colored closer to steps, etc. Add many neglected styles.
enh: Save DOTs if DEBUG; save it before…
fix: save debug-DOT before rendering images, to still get those files as debug aid in case of errors.
fix: workaround missing lineno on doctest failures, an incomplete solution introduced upstream by sphinx-doc/sphinx#4584.
BREAK: rename context-manager configuration function debug –> debug_enabled.
GRAPHTIK_DEBUGfor enabling is_debug() configuration.
enh: Clarified relation and duties of the new term dependency.
enh: Linked many terms from quick-start section.
enh(site): support for Sphinx’s standard colored-text roles.
DEPRECATE(plot): show argument in plot methods & functions; dropped completely from the args of the younger class
It has merged with filename param (the later takes precedence if both given).
ENH: apply more styles on data-nodes; distinguish between Prune/Cancel/Evict data Styles and add tooltips for those cases (ie data nodes without values).
DROP: do not plot wth
splines=ortho, because it crashes with some shapes; explain in docs how to re-enables this (x2 ways).
FIX: node/edge attributes were ignored due to networkx API misuse - add TCs on that.
FIX: Networks were not plotting Inps/Outs/Name due to forgotten
_no_plotnx-attribute to filter out nodes/edges.
ENH(base): improve auto-naming of operations, descending partials politely and handling better builtins.
enh(build, site, doc): graft Build Ver/Date as gotten from Git in PyPi landing-page.
Should have been a MAJOR BUMP due to breaking renames, but…no clients yet (and just out of to 5.x –> 6.x major bump).
installed_plotter --> active_plotter.
REFACT/BREAK(config): denote context-manager functions by adding a
with_XXX()cloning methods on Plotter/Style instances.
FIX(plot): Style cstor were had his methods broken due to eager copying them from its parent class.
–((superseded by v6.1.0 due to installed_potter –> active_plotter))–
ENH: Render operation nodes with Graphviz HTML-Table Labels.
ENH: Convey graph, node & edge (“non-private”) attributes from the networkx graph given to the plotter.
FEAT: Operation node link to docs (hackish, based on a URL formatting).
Improved plotting documentation & +3 new terms.
FIX: ReadTheDice deps
drop(plot): don’t suppress the grafting of the title in netop images.
ENH(PLOT): Operation tooltips now show function sources.
FIX(site): RTD failing since 5.6.0 due to sphinxcontrib-spelling extension not included n its requirements.
graphtik_plot_keywordssphinx-configuration with a default value that suppresses grafting the title of a netop in the images, to avoid duplication when
graphtik:name:option is given.
enh(plot): URL/tooltips are now overridable with node_props
enh(sphinxext): permalink plottables with :name: option.
enh(plot): pan-zoom follows parent container block, on window resize; reduce zoom mouse speed.
All previous distributions in PyPi since sphinx-extension was added in v5.3.0
were missing the new package
sphinxext needed to build sites with
.. graphtik:: directive.
–((BROKEN because wheel in PyPi is missing
Solution.check_if_incomplete()just to get multi-errors (not raise them)
doc: integrate spellchecking of VSCode IDE & sphinxcontrib.spelling.
–((BROKEN because wheel in PyPi is missing
Should have been a major bump due to breaking rename of
but…no clients yet.
ENH(plot): plot edges in graphs with Graphviz
REFACT(plot): rename base class from
Plotter --> Plottable;
[dev]distribution extras as an alias to
[all]. doc: referred to the new name from a new term in glossary.
enh(site): put RST substitutions in
rst_epilogconfiguration (instead of importing them from README’s tails).
@operationas a decorator.
–((BROKEN because wheel in PyPi is missing
enh(op): use func_name if none given.
DOC(quickstart): dynamic plots with sphinxext.
–((BROKEN because wheel in PyPi is missing
FEAT(PLOT,SITE): Sphinx extension for plotting graph-diagrams as zoomable SVGs (default), PNGs (with link maps), PDFs, etc.
replace pre-plotted diagrams with dynamic ones.
deps: sphinx >=2; split (optional) matplolib dependencies from graphviz.
test: install and use Sphinx’s harness for testing site features & extensions.
ENH(op): fail early if 1st argument of operation is not a callable.
enh(plot): possible to control the name of the graph, in the result DOT-language (it was stuck to
upd(conf): detailed object representations are enabled by new configuration
debugflag (instead of piggybacking on
links-to-sources resolution function was discarding parent object if it could not locate the exact position in the sources;
TC: launch site building in pytest interpreter, to control visibility of logs & stdout;
add index pages, linked from TOCs.
FIX(NET): PARALLEL was ALWAYS enabled.
FIX(PLOT): workaround pydot parsing of node-ID & labels (see pydot#111 about DOT-keywords & pydot#224 about colons
:) by converting IDs to HTML-strings; additionally, this project did not follow Graphviz grammatical-rules for IDs.
FIX(NET): impossible outs (outputs that cannot be produced from given inputs) were not raised!
enh(plot): clicking the background of a diagram would link to the legend url, which was annoying; replaced with a separate “legend” node.
refact: decouple varargs from optional modifiers hierarchy.
REFACT(OP): preparation of NEEDS –> function-args happens once for each argument, allowing to report all errors at once.
feat(base): +MultiValueError exception class.
DOC(modifiers,arch): modifiers were not included in “API reference”, nor in the glossary sections.
FIX: spell-check everything, and add all custom words in the VSCode settings file
ENH(OP): flag returns_dict handles also named-tuples & objects (
v5.0.0 (31 Dec 2019, @ankostis): Method–>Parallel, all configs now per op flags; Screaming Solutions on fails/partials¶
compose(method="parallel") --> compose(parallel=None/False/True)and DROP
netop.set_execution_method(method); parallel now also controlled with the global
feat(jetsam): report task executed in raised exceptions.
netop.narrowed() --> withset()toi mimic
break: rename flags:
reschedule --> rescheduleD
marshal --> marshalLED.
break: rename global configs, as context-managers:
marshal_parallel_tasks --> tasks_marshalled
endure_operations --> operations_endured
FIX(net, plan,.TC): global skip eviction\s flag were not fully obeyed (was untested).
FIX(OP): revamped zipping of function outputs with expected provides, for all combinations of rescheduled,
NO_RESULT& returns dictionary flags.
refact: extract configs in their own module.
refact: make all global flags tri-state (
None, False, True), allowing to “force” operation flags when not None. All default to
ENH(net, sol, logs): include a “solution-id” in revamped log messages, to facilitate developers to discover issues when multiple netops are running concurrently. Heavily enhanced log messages make sense to the reader of all actions performed.
ENH(plot): set toolltips with
repr(op)to view all operation flags.
FIX(TCs): close process-pools; now much more TCs for parallel combinations of threaded, process-pool & marshalled.
ENH(netop,net): possible to abort many netops at once, by resetting abort flag on every call of
Pipeline.compute()(instead of on the first stopped netop).
scream_if_incomplete()will raise the new
IncompleteExecutionErrorexception if failures/partial-outs of endured/rescheduled operations prevented all operations to complete; exception message details causal errors and conditions.
feat(build): +``all`` extras.
FAIL: x2 multi-threaded TCs fail spuriously with “inverse dag edges”:
both marked as
[x] dynamic Reschedule after operations with partial outputs execute.
[x] raise after jetsam.
[x] plots link to legend.
[x] refact netop
[x] endurance per op.
[x] endurance/reschedule for all netop ops.
[x] merge _Rescheduler into Solution.
[x] keep order of outputs in Solution even for parallels.
[x] keep solution layers ordered also for parallel.
[x] require user to create & enter pools.
[x] FIX pickling THREAD POOL –>Process.
FIX(NET): keep Solution’s insertion order also for PARALLEL executions.
feat(netop): new method
Pipeline.compile(), delegating to same-named method of network.
Net.narrowed(); remember netop.narrowed(outputs+predicate) and apply them on netop.compute() &
PROS: cache narrowed plans.
CONS: cannot review network, must review plan of (new) netop.compile().
drop(netop): inputs args in narrowed() didn’t make much sense, leftover from “unvarying netops”; but exist ni netop.compile().
refact(netop): move net-assembly from compose() –> NetOp cstor; now reschedule/endured/merge/method args in cstor.
NET,OP,TCs: FIX PARALLEL POOL CONCURRENCY
feat: +marshal +_OpTask
refact: plan._call_op –> _handle_task
enh: Make abort run variable a shared-memory
REFACT(OP,.TC): not a namedtuple, breaks pickling.
FIX: compare Tokens with is –> ==, or else, it won’t work for sub-processes.
TEST: x MULTIPLE TESTS
+4 tags: parallel, thread, proc, marshal.
many uses of exemethod.
FIX(build): PyPi README check did not detect forbidden
rawdirectives, and travis auto-deployments were failing.
doc(arch): more terms.
FEAT(OP): support “aliases” of provides, to avoid trivial pipe-through operations, just to rename & match operations.
set_endure_operations()configuration is set to true, a pipeline will keep on calculating solution, skipping any operations downstream from failed ones. The solution eventually collects all failures in
ENH(DOC,plot): Links in Legend and Architecture Workflow SVGs now work, and delegate to architecture terms.
refact(conf): fully rename configuration operation
REFACT(jetsam): raise after jetsam in situ, better for Readers & Linters.
enh(net): improve logging.
FIX(NET): TOPOLOGICALLY-sort now break ties respecting operations insertion order.
DROP(plot): executed arg from plotting; now embedded in solution.
ENH(PLOT.jupyter,doc): allow to set jupyter graph-styling selectively; fix instructions for jupyter cell-resizing.
fix(plan): time-keeping worked only for sequential execution, not parallel. Refactor it to happen centrally.
enh(NET,.TC): Add PREDICATE argument also for
FEAT(DOC): add GLOSSARY as new Architecture section, linked from API HEADERS.
plan.repr()was failing on empty plans.
fix(site): minor badge fix & landing diagram.
BREAK/ENH(NETOP): MERGE NESTED NetOps by collecting all their operations in a single Network; now children netops are not pruned in case some of their needs are unsatisfied.
feat(op): support multiple nesting under other netops.
BREAK(NETOP): REVERT Unvarying NetOps+base-plan, and narrow Networks instead; netops were too rigid, code was cumbersome, and could not really pinpoint the narrowed needs always correctly (e.g. when they were also provides).
A netop always narrows its net based on given inputs/outputs. This means that the net might be a subset of the one constructed out of the given operations. If you want all nodes, don’t specify needs/provides.
plan, needs, plan
drop recompile flag in
feat(net): new method
Network.narrowed()clones and narrows.
Network()cstor accepts a (cloned) graph to support
BREAK/REFACT(OP): simplify hierarchy, make
Operationfully abstract, without name or requirements.
FnOpIMMUTABLE, by inheriting from class:.namedtuple.
refact(net): consider as netop needs also intermediate data nodes.
FEAT(#1, net, netop): support pruning based on arbitrary operation attributes (e.g. assign “colors” to nodes and solve a subset each time).
repr()now counts number of contained operations.
netop.narrow() --> narrowed()
drop(netop): don’t topologically-sort sub-networks before merging them; might change some results, but gives control back to the user to define nets.
break/refact(NET): scream on
net.prune()) so as calmly solve needs vs provides, based on the given inputs/outputs.
FIX(ot): was failing when plotting graphs with ops without fn set.
enh(net): minor fixes on assertions.
BREAK(NET): RAISE if the graph is UNSOLVABLE for the given needs & provides! (see “raises” list of
Pipeline.__call__()accepts solution as keyword-args, to mimic API of
outputskeyword has been dropped.
Pipeline.compute()when you ask different outputs, or set the
recompileflag if just different inputs are given.
Read the next change-items for the new behavior of the
BREAK: calling method
Pipeline.compute()with a single argument is now UNVARYING, meaning that all needs are demanded, and hence, all provides are produced, unless the
recompileflag is true or
BREAK: net-operations behave like regular operations when nested inside another netop, and always produce all their provides, or scream if less inputs than needs are given.
ENH: a newly created or cloned netop can be
narrowed()to specific needs & provides, so as not needing to pass outputs on every call to
feat: implemented based on the new “narrowed”
FIX: netop needs are not all optional by default; optionality applied only if all underlying operations have a certain need as optional.
composeAPI by turning it from class –> function; all args and operations are now given in a single
REFACT(net, netop): make Network IMMUTABLE by appending all operations together, in
Network.prune()`()which can be used to interrogate needs & provides for a given graph. It accepts None inputs & outputs to auto-derive them.
FIX(SITE): autodocs API chapter were not generated in at all, due to import errors, fixed by using autodoc_mock_imports on networkx, pydot & boltons libs.
enh(op): polite error-,msg when calling an operation with missing needs (instead of an abrupt
FEAT(CI): test also on Python-3.8
FEAT(plot): render Zoomable SVGs in jupyter(lab) notebooks.
break(netop): rename execution-method
"sequential" --> None.
refact(netop): convert remaining
**kwargsinto named args, tighten up API.
REFACT(src): split module
fnop.py+ netop.py and move
fnop.py, in order to break cycle of base(op) <– net <– netop, and keep utils only in base.py.
ENH(op): allow Operations WITHOUT any NEEDS.
ENH(op): allow Operation FUNCTIONS to return directly Dictionaries.
ENH(op): validate function Results against operation provides; jetsam now includes results variables:
BREAK(op): drop unused Operation._after_init() pickle-hook; use dill instead.
Operation._validate()into a function, to be called by clients wishing to automate operation construction.
**kwargswith named-args in class:FnOp, because it allowed too wide args, and offered no help to the user.
network._execution_configs; expose more config-methods from base package.
BREAK: drop Python-3.6 compatibility.
FEAT: Use (possibly multiple) global configurations for all networks, stored in a
ENH/BREAK: Use a (possibly) single execution_pool in global-configs.
feat: add abort flag in global-configs.
feat: add skip_evictions flag in global-configs.
The first non pre-release for 2.x train.
BRAKE API: DROP Operation’s
params- use functools.partial() instead.
BRAKE API: DROP Backward-Compatible
BRAKE: DROP Pickle workarounds - expected to use
break(jetsam): drop “graphtik_` prefix from annotated attribute
operation()supported the “builder pattern” with
REFACT: renamed internal package functional –> nodes and moved classes around, to break cycles easier, (
baseworks as supposed to), not to import early everything, but to fail plot early if
REFACT: move PLAN and
Network --> Pipeline.
ENH(NET): new PLAN BUILDING algorithm produces PERFECT EVICTIONS, that is, it gradually eliminates from the solution all non-asked outputs.
enh: pruning now cleans isolated data.
enh: eviction-instructions are inserted due to two different conditions: once for unneeded data in the past, and another for unused produced data (those not belonging typo the pruned dag).
enh: discard immediately irrelevant inputs.
ENH(net): changed results, now unrelated inputs are not included in solution.
refact(sideffect): store them as node-attributes in DAG, fix their combination with pinning & eviction.
fix(parallel): eviction was not working due to a typo 65 commits back!
FIX: multithreaded operations were failing due to shared
FIX: pruning sometimes were inserting plan string in DAG. (not
ENH: heavily reinforced exception annotations (“jetsam”):
FIX: (8f3ec3a) outer graphs/ops do not override the inner cause.
ENH: retrofitted exception-annotations as a single dictionary, to print it in one shot (8f3ec3a & 8d0de1f)
enh: more data in a dictionary
TCs: Add thorough TCs (8f3ec3a & b8063e5).
REFACT: rename Delete–>`Evict`, removed Placeholder from data nodes, privatize node-classes.
ENH: collect “jetsam” on errors and annotate exceptions with them.
ENH(sideffects): make them always DIFFERENT from regular DATA, to allow to co-exist.
fix(sideffects): typo in add_op() were mixing needs/provides.
enh: accept a single string as outputs when running graphs.
TCs: pytest now checks sphinx-site builds without any warnings.
Established chores with build services:
Travis (and auto-deploy to PyPi),
Kept external API (hopefully) the same, but revamped pruning algorithm and
refactored network compute/compile structure, so results may change; significantly
enhanced plotting. The only new feature actually is the
Pruning now works by breaking incoming provide-links to any given intermediate inputs dropping operations with partial inputs or without outputs.
The end result is that operations in the graph that do not have all inputs satisfied, they are skipped (in v1.2.4 they crashed).
Also started annotating edges with optional/sideffects, to make proper use of the underlying
Moved also the check for when to evict a value, from running the execution-plan, to when building it; thus, execute methods don’t need outputs anymore.
ENH(yahoo#26): “Pin* input values that may be overwritten by calculated ones.
This required the introduction of the new
_PinInstructionin the execution plan.
Unfortunately, it non-determinism has not been fixed in < PY3.5, just reduced the frequency of spurious failures, caused by unstable dicts, and the use of subgraphs.
enh: Annotate operation exceptions with
ExecutionPlanto aid debug sessions,
show layers()not needed,
repr()is a better replacement.
execution-steps & order
evict & pin instructions
given inputs & asked outputs
solution values (just if they are present)
“optional” needs & broken links during pruning
REFACT: Move all API doc on plotting in a single module, split in 2 phases, build DOT & render DOT
FIX(yahoo#13): bring plot writing into files up-to-date from PY2; do not create plot-file if given file-extension is not supported.
FEAT: path pydot library to support rendering in Jupyter notebooks.
Increased coverage from 77% –> 90%.
pytest, to facilitate TCs parametrization.
ENH(yahoo#30): Doctest all code; enabled many assertions that were just print-outs in v1.2.4.
operation.__repr__()was crashing when not all arguments had been set - a condition frequently met during debugging session or failed TCs (inspired by @syamajala’s 309338340).
enh: Sped up parallel/multithread TCs by reducing delays & repetitions.
pytest -m slowto run those slow tests.
FEAT: add changelog in
CHANGES.rstfile, containing flowcharts to compare versions
v1.2.4 <--> v1.3..0.
enh: updated site & documentation for all new features, comparing with v1.2.4.
enh(yahoo#30): added “API reference’ chapter.
sphinx_rtd_themelibrary is the default theme for Sphinx now.
Blocking bug in plotting code for Python-3.x.
Test-cases without assertions (just prints).
Versioning now is manually specified to avoid bug where the version was not being correctly reflected on pip install deployments
1.2.1 (Feb 23, 2018, @huyng): Fixed multi-threading bug and faster compute through caching of find_necessary_steps¶
We’ve introduced a cache to avoid computing find_necessary_steps multiple times during each inference call.
This has 2 benefits:
It reduces computation time of the compute call
It avoids a subtle multi-threading bug in networkx when accessing the graph from a high number of threads.
Added set_execution_method(‘parallel’) for execution of graphs in parallel.
Minor Bug Fixes:
Compatibility fix for networkx 2.0
net.times now only stores timing info from the most recent run
Merge pull request yahoo#6 from yahoo/plot-optional
make plotting dependencies optional
Remove ‘packaging’ as dependency