You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
registry on pydantic: a Component is a frozen pydantic model, and a spec is {"type": type_id, "version": n, **fields} JSON. @component(type_id, version=, versions=) registers it; a field typed as a family base parses any registered member, so families stay open to other packages, and each member is written with its own fields
@component(type_id, builds=Impl) links a config to its implementation (registry.config_of)
data.SamplerParams: a small model of the sampler settings, passed as sampler= (or a plain mapping) to Loader and Loader.from_paths, with per-stream overrides in stream_samplers=
Removed
cattrs and attrs
The {type, version, config} envelope
registry.register_live: anything a spec cannot hold (a live object, or a value that does not read back) raises PortabilityError when the spec is written
registry.build, Component.build and Component.build_spec: each family declares its own typed build
data.SamplerKwargs, the batch_size / chunk_size / preload_nchunks keywords, and sampler settings on Stream: pass sampler= / stream_samplers= to the loader
Fixed
registry: components inside dict, list and tuple fields keep their type through to_spec / parse (#14)