-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: overriding intermediate data when no outputs asked #25
Comments
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 2, 2019
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 2, 2019
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 2, 2019
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 2, 2019
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 2, 2019
def test_pruning_multiouts_not_override_intermediates1():
# Test #25: v.1.2.4 overrides intermediate data when a previous operation
# must run for its other outputs (outputs asked or not)
netop = compose(name="netop")(
operation(name="must run", needs=["a"], provides=["overriden", "calced"])
(lambda x: (x, 2 * x)),
operation(name="add", needs=["overriden", "calced"], provides=["asked"])(add),
)
netop.net.plot('t.png')
# FAILs
# - on v1.2.4 with KeyError: 'e',
# - on #18(unsatisfied) + #23(ordered-sets) with empty result.
assert netop({"a": 5, "overriden": 1, "c": 2}, ["asked"]) == {"asked": 3}
# FAILs
# - on v1.2.4 with (overriden, asked) = (5, 15) instead of (1, 1)
# - on #18(unsatisfied) + #23(ordered-sets) like v1.2.4.
assert (
netop({"a": 5, "overriden": 1})
==
{"a": 5, "overriden": 1, "calced": 10, "asked": 3}) |
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x2 TCs, in yahoo#24 and 1st in yahoo#25 now PASS. - 2x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x2 TCs, in yahoo#24 and 1st in yahoo#25 now PASS. - 2x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x2 TCs, in yahoo#24 and 1st in yahoo#25 now PASS. - 2x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x2 TCs, in yahoo#24 and 1st in yahoo#25 now PASS. - 2x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x3 TCs PASS, x1 in yahoo#24 and the first x2 in yahoo#25. - 1x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x3 TCs PASS, x1 in yahoo#24 and the first x2 in yahoo#25. - 1x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Pruning behaves correctly also when outputs given; this happens by breaking incoming provide-links to any given intermedediate inputs. + Unsatisfied detection now includes those without outputs due to broken links (above). + Remove some uneeded "glue" from unsatisfied-detection code, leftover from previous compile() refactoring. + Renamed satisfiable --> satisfied. + Improved unknown output requested raise-message. + x3 TCs PASS, x1 in yahoo#24 and the first x2 in yahoo#25. - 1x TCs in yahoo#25 still FAIL, and need "Pinning" of given-inputs (the operation MUST and MUST NOT run in these cases).
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 3, 2019
+ Insert "PinInstructions" in the execution-plan to avoid overwritting. + Add `_overwrite_collector` in `compose()` to collect re-calculated values. + FIX the last TC in yahoo#25.
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 4, 2019
…must run + Insert "PinInstructions" in the execution-plan to avoid overwritting. + Add `_overwrite_collector` in `compose()` to collect re-calculated values. + FIX the last TC in yahoo#25.
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 4, 2019
…must run - WIP: PARALLEL execution not adding PINS! + Insert "PinInstructions" in the execution-plan to avoid overwritting. + Add `_overwrite_collector` in `compose()` to collect re-calculated values. + FIX the last TC in yahoo#25.
ankostis
added a commit
to ankostis/graphtik
that referenced
this issue
Oct 4, 2019
+ ALL TCs OK after ~10 fails with yahoo#25, yahoo#25 bugs, BUT... - WIP: STILL no PIN on PARALLEL. + move check if value in asked outputs before cache-evicting it in build-execution-plan time - compute methods don't need outputs anymore. + test: speed up parallel/multihtread TCs by reducing delays & repetitions. + refact: network rightfully adopted stray functions for parallel processing - they all worke on the net.graph, + upd: networkx api by indexing on `dag.nodes` views. + enh: add log message when deleting in parallel (in par with sequential code). + refact: var-renames, if-then-else simplifications, pythonisms.
This was referenced Oct 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the following diagram, all data are given, and
asked
is different, depending on whether we expicitly ask it in the outputs:asked
output asked, it checksoverriden
is already given and dose not recompute it,Code to reproduce it:
Root cause:
Note that the pruning code in v1.2.4 is buggy (#24), so it cannot be used as is.
The text was updated successfully, but these errors were encountered: