Closed m-novikov closed 5 years ago
I am a bit confused with the fact that this feature is called "transaction". I would expect the following behaviour:
I am open to alternative naming. Currently when we speak about this "feature" we use transaction slots
concept.
I am a bit confused with the fact that this feature is called "transaction". I would expect the following behaviour:
op.Input.setValue("spam") with op.transaction: op.Input.setValue("eggs") assert op.Input.value == "spam" assert op.Input.value == "eggs"
it's true that you kind of have to know our code in order to understand the meaning of transaction here. However, it is not a slot level transaction, but an operator level one, so I think this is fine if properly documented.
I think this is fine if properly documented.
LGTM
Also, I would advise against using @property
for transaction
because it visibly changes the instance state.
Also, I would advise against using
@property
fortransaction
because it visibly changes the instance state.
It doesn't change public interface only internal state. As an example, descriptors fields and cached properties, that also change internal state and still are properties.
To make transactions work with OperatorWrapper
I moved it to a graph level.
I am a bit confused with the fact that this feature is called "transaction". I would expect the following behaviour: