Skip to content

OpHints configuration problems/limitations #101

Closed

Description

@hinerm

In scijava/incubator@ca94db4 I skip logging outputs if the corresponding metadata flag is set. This seems like sensible behavior to me.

However, in doing so, the ProvenanceTest#testMappingProvenance test now fails.

This route does not actually hit my code changes on that branch. Rather, the failure is because in DefaultOpEnvironment#resolveOpDependencies we are always creating a new set of Hints that disable recording - and that flag is now being respected.

This seems highly dangerous to me, in part because there was no way for me to tell Ops to "yes, actually record all history during this execution" - because first of all there is no way to "invert" a hint (Hints.minus(History.SKIP_RECORDING) does nothing if recording hasn't already been disabled) and second the DefaultOpEnvironment doesn't check to see if it's overwriting previous settings.

Removing the setting of History.SKIP_RECORDING in DefualtOpEnvironment#resolveOpDependencies makes all tests pass so I'm not sure why it was being done in the first place?

Activity

  1. added this to the 1.0.0 milestone on Oct 20, 2022
  2. ctrueden commented on Oct 21, 2022

    @ctrueden
    Member
  3. hinerm commented on Oct 24, 2022

    @hinerm
    MemberAuthor

    @ctrueden @gselzer currently Hints are immutable, making what I am trying to do in scijava/incubator#64 impossible.

    Some thoughts on ways forward:

    • Make Hinits mutable. This is a big change and fundamentally alters the idea of Hints being set for a particular Op match/run.
    • I'm assuming I could disable history logging in the javadoc for these Map ops somehow? But that's overly-aggressive and then the Map ops would probably want to forcibly record history that they ran.
    • I think maybe what we want is for the Map op to have some say on how its delegate op is matched, with the skipRecording hint flagged there, so the op here has recording disabled.. but at the time of compute it's too late right? It needs to be done at the matching stage somehow?
  4. gselzer commented on Oct 24, 2022

    @gselzer
    Member
    • Make Hinits mutable. This is a big change and fundamentally alters the idea of Hints being set for a particular Op match/run.

    They were mutable at some point, but @ctrueden and I decided against that (can't remember the reasoning why, but we did it in scijava/incubator#46). I agree that making this change back to mutability would be tricky, and am not a fan.

    • I think maybe what we want is for the Map op to have some say on how its delegate op is matched, with the skipRecording hint flagged there, so the op here has recording disabled.. but at the time of compute it's too late right? It needs to be done at the matching stage somehow?

    Yeah, I always wanted some extensible way for an OpDependency to be able to declare Hints for matching time, but it's tricky with the restrictions on annotation fields.

    Right now, OpDependency.adaptable() exists so the adapt Ops can prevent adapting recursion. It'd be cool if we could generalize that to some Hints field. The best idea off the top of my head is adding some hints field that is a serialized Hints object...

  5. gselzer commented on Aug 11, 2023

    @gselzer
    Member

    @hinerm is this still an issue? Looks like scijava/incubator#64 got merged...

  6. added a commit that references this issue on May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions