-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If a feature is called directly, its result is cached internally. This can affect how it behaves when reused in chained pipelines. For example:
stack_feature = dt.Stack(value=2)
_ = stack_feature(1) # Evaluate the feature and cache the output
(1 & stack_feature)()
[1, 1, 2]
To ensure consistent behavior when reusing a feature after calling it, reset its state using instead:
stack_feature = dt.Stack(value=2)
_ = stack_feature(1)
stack_feature.update() # clear cached state
(1 & stack_feature)()
[1, 2]
This should not happen and is probably a problem with the caching. The two calls should both produce [1, 2]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working