GeneratorPrimitiveBase(*, hyperparams, random_seed=0, docker_containers=None, volumes=None, temporary_directory=None)¶
A base class for primitives which have to be fitted before they can start producing (useful) outputs, but they are fitted only on output data. Moreover, they do not accept any inputs to generate outputs, which is represented as a sequence (list) of non-negative integer values to
producemethod, only to signal how many outputs are requested, and which one from the potential set of outputs.
The list of integer values to
producemethod provides support for batching. A caller does not have to rely on the order in which the primitive is called but can specify the index of the requested output.
This class is parameterized using only by three type variables,
fit_multi_produce(*, produce_methods, inputs, outputs, timeout=None, iterations=None)¶
A method calling
fitand after that multiple produce methods at once.
List) – The inputs given to all produce methods.
outputs (~Outputs) – The outputs given to
A dict of values for each produce method wrapped inside
- Return type
Sets training data of this primitive.
outputs (~Outputs) – The outputs.
- Return type
docker_containers: Dict[str, d3m.primitive_interfaces.base.DockerContainer]¶
A dict mapping Docker image keys from primitive’s metadata to (named) tuples containing container’s address under which the container is accessible by the primitive, and a dict mapping exposed ports to ports on that address.
Hyperparams passed to the constructor.
Primitive’s logger. Available as a class attribute. This gets automatically set to primitive’s logger in metaclass.
Primitive’s metadata. Available as a class attribute. Primitive author should provide all fields which cannot be determined automatically inside the code. In this way metadata is close to the code and it is easier for consumers to make sure metadata they are using is really matching the code they are using. PrimitiveMetadata class updates itself with metadata about code and other things it can extract automatically.
An absolute path to a temporary directory a primitive can use to store any files for the duration of the current pipeline run phase. Directory is automatically cleaned up after the current pipeline run phase finishes.