Virtual population design
VpopDesign
Returned by: JinkoClient.create_vpop_design_from_design, JinkoClient.create_vpop_design_from_json, JinkoClient.get_vpop_design, JinkoClient.iter_vpop_designs, JinkoClient.list_vpop_designs, Model.create_vpop_design_from_design, Model.create_vpop_design_from_model, VpopDesign.clear_model, VpopDesign.set_model
Also has every member of ProjectItem.
| Member | Kind | Description |
|---|---|---|
generated_vpops | attribute | |
descriptors | property | Access the descriptors stored in this design. |
correlations | property | Access the pairwise correlations stored in this design. |
get_model | method | Return the model currently linked to this design. |
set_model | method | Link this design to a model snapshot. |
clear_model | method | Remove the linked model from this design. |
diagnostics | property | Return sanity diagnostics for the current design snapshot. |
diagnostics_at | method | Return sanity diagnostics for a specific design revision. |
generate_vpop | method | Generate a Vpop from this design. |
generated_vpops
descriptors
Type: DescriptorsService
Access the descriptors stored in this design.
Use this service to list descriptors, fetch one by id, and create new ones.
correlations
Type: CorrelationsService
Access the pairwise correlations stored in this design.
get_model
get_model() -> Model | None
Return the model currently linked to this design.
Returns None when no model is linked.
set_model
set_model(
model: Model | str | dict[str, str], *, version: str | dict | None = None
) -> VpopDesign
Link this design to a model snapshot.
Pass either a Model handle, a model SID string, or a dict with the
keys coreItemId and snapshotId.
clear_model
clear_model(*, version: str | dict | None = None) -> VpopDesign
Remove the linked model from this design.
diagnostics
Type: VpopDesignDiagnostics
Return sanity diagnostics for the current design snapshot.
Each access fetches a fresh, self-consistent snapshot: sanity
messages plus the resolved descriptor/model-component context used by
VpopDesignDiagnostics.explain. Filtering the returned view
(.errors(), .for_field(...), etc.) and calling .explain()
do not make further requests - re-access this property for updated
results.
diagnostics_at
diagnostics_at(revision: int) -> VpopDesignDiagnostics
Return sanity diagnostics for a specific design revision.
See diagnostics for the freshness contract of the returned view.
generate_vpop
generate_vpop(
*,
variance_reduction: bool | None = None,
size: int | None = None,
seed: int | None = None,
optimize_correlation: bool | None = None,
maximum_iterations: int | None = None,
categorical_correlation_num_iterations: int | None = None,
folder: Folder | str | None | _UnsetType = _UNSET,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> Vpop
Generate a Vpop from this design.
When folder is left unset, the generated Vpop is stored in this
design's first folder when available.
Leave optional generation fields unset to use the API defaults.
VpopDesignDiagnostic
A single sanity diagnostic attached to a Vpop design descriptor entry.
Returned by: VpopDesignDiagnostics.by_field
| Member | Kind | Description |
|---|---|---|
descriptor_id | attribute | |
immutable_id | attribute | |
field | attribute | |
diagnostic | attribute | |
details | attribute | Resolved descriptor/model-component context (distribution, formula, etc.), captured once when this diagnostics view was fetched. Used by VpopDesignDiagnostics.explain. |
component_kind | property | |
component | property |
descriptor_id
Type: str
immutable_id
Type: str | None
field
Type: VpopDesignDiagnosticField
diagnostic
Type: DiagnosticDetails
details
Type: str | None
Resolved descriptor/model-component context (distribution, formula,
etc.), captured once when this diagnostics view was fetched. Used by
VpopDesignDiagnostics.explain.
component_kind
Type: str
component
Type: _DescriptorRef
VpopDesignDiagnostics
A filterable, printable, iterable view over Vpop design sanity diagnostics.
Returned by: VpopDesign.diagnostics, VpopDesign.diagnostics_at, VpopDesignDiagnostics.for_descriptor, VpopDesignDiagnostics.for_field
| Member | Kind | Description |
|---|---|---|
for_descriptor | method | |
for_field | method | |
by_descriptor | method | |
by_field | method | |
explain | method | Render these diagnostics together with the corresponding descriptor's distribution and, where available, its linked model component's definition (e.g. a parameter's formula, an ODE's right-hand side). |
with_severity | method | |
with_code | method | |
errors | method | |
warnings | method | |
has_errors | method | |
by_severity | method |
for_descriptor
for_descriptor(descriptor: str) -> VpopDesignDiagnostics
for_field
for_field(*fields: VpopDesignDiagnosticField = ()) -> VpopDesignDiagnostics
by_descriptor
by_descriptor() -> dict[str, list[DiagnosticDetails]]
by_field
by_field() -> (
dict[VpopDesignDiagnosticField, list[VpopDesignDiagnostic]]
)
explain
explain() -> str
Render these diagnostics together with the corresponding descriptor's distribution and, where available, its linked model component's definition (e.g. a parameter's formula, an ODE's right-hand side).
This resolved context was captured once, when this diagnostics view
was fetched (i.e. when design.diagnostics / design.diagnostics_at()
was accessed) - calling .explain() itself makes no network request.
Re-access design.diagnostics for an updated view. Composes with
existing filters, e.g.::
design.diagnostics.errors().for_field("marginalDistributions").explain()
with_severity
with_severity(*severities: SeverityLiteral = ())
with_code
with_code(*codes: str = ())
errors
errors()
warnings
warnings()
has_errors
has_errors() -> bool
by_severity
by_severity() -> dict[str, list[EntryT]]