Skip to content

Any operator with a cache deep inside needs to implement _setInSlot(...): pass... #3121

Description

@k-dominik

Currently, any op where SomeSlot[slicing] = value is called needs to implement _setInSlot(...): pass) in order for the forwarding to a (possibly) nested cache op can be done - which - idk, I find a bit too much noise (as well as these comments throughout the code base that @btbest mentioned in #3119). I was still debating though how to safely do so that one could not forget to implement it in the ops that actually need it (like caches)... So for this PR I'm gonna leave it in, but will open an issue.

It would be nice to do something like getattr(self.operator, "_setInSlot") in Slot, but that way when writing a cache from scratch it would be easy to miss and likely unclear how the proper way of doing it is...

xref: #3119, #3119 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lazyflowissues related to the lazyflow codebase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions