Commit 1ecf9306 authored by Mitar's avatar Mitar
Browse files

Converted to use a singleton decorator.

parent 49b697fb
Pipeline #20435481 passed with stage
in 4 minutes and 49 seconds
......@@ -34,7 +34,7 @@ class Hyperparams(hyperparams.Hyperparams):
pass
class SumPrimitive(transformer.TransformerPrimitiveBase[Inputs, Outputs, Hyperparams], base.SingletonOutputMixin[Inputs, Outputs, None, Hyperparams]):
class SumPrimitive(transformer.TransformerPrimitiveBase[Inputs, Outputs, Hyperparams]):
# It is important to provide a docstring because this docstring is used as a description of
# a primitive. Some callers might analyze it to determine the nature and purpose of a primitive.
......@@ -114,6 +114,7 @@ class SumPrimitive(transformer.TransformerPrimitiveBase[Inputs, Outputs, Hyperpa
else:
return value
@base.singleton
def produce(self, *, inputs: Inputs, timeout: float = None, iterations: int = None) -> base.CallResult[Outputs]:
# In the future, we should store here data in Arrow format into
# Plasma store and just pass an ObjectId of data over HTTP.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment