PlatypusSpec

PlatypusSpec()

The shared base of SegmentationSpec and DetectionSpec.

Not built directly - data and models live on the subclasses, because their types are what task selects. from_dict and from_yaml return whichever one the task asks for, and both are instances of this, so anything that only needs a name, a seed or a rank can take a PlatypusSpec and not care.

Attributes

Name Description
n_class How many classes the data describes. The data decides, at either task.

Methods

Name Description
deterministic_needs_a_seed Constraining the algorithms while the draw still varies buys nothing.
one_rank_per_spec All models in a spec share one data pipeline, so they share one rank. Mixing
refuse_the_base_class Say what is wrong directly. Without this, PlatypusSpec(data=..., models=...)
to_dict Plain data, for the trip back across the bridge into R.

deterministic_needs_a_seed

PlatypusSpec.deterministic_needs_a_seed()

Constraining the algorithms while the draw still varies buys nothing.

deterministic exists so that two runs of one configuration on one card land on the same numbers. Without seed the initialisation, the shuffle and the augmentation all still differ, so the run is exactly as unrepeatable as before and only slower - and slower by an amount nobody can see the reason for. Refused here rather than warned about, because this is one of the two halves of the promise and a half promise is what platypus#122 was filed about.

one_rank_per_spec

PlatypusSpec.one_rank_per_spec()

All models in a spec share one data pipeline, so they share one rank. Mixing 2D and 3D in a single run is a mistake, not a feature.

refuse_the_base_class

PlatypusSpec.refuse_the_base_class(data)

Say what is wrong directly. Without this, PlatypusSpec(data=..., models=...) fails as two ‘extra inputs are not permitted’ errors, which describes the symptom and not the cause.

to_dict

PlatypusSpec.to_dict()

Plain data, for the trip back across the bridge into R.