Skip to main content

Calibration

Calibration​

Domain object wrapping calibration actions.

Returned by: Calibration.edit_solving_options, Calibration.set_solving_times, JinkoClient.create_calibration, JinkoClient.create_calibration_from_json, JinkoClient.get_calibration, JinkoClient.iter_calibrations, JinkoClient.list_calibrations, Model.create_calibration

Also has every member of ProjectItem.

MemberKindDescription
runmethodStart this calibration run.
stopmethodStop a running calibration.
statusmethodReturn calibration status with metadata.
wait_until_completedmethodPoll status until calibration reaches a terminal state or timeout.
get_sanitymethodReturn the pre-launch sanity report (model/protocol/output-set/scorings/data-tables/parameters/options/solving-times).
get_solving_timesmethodReturn base and additional output sampling periods.
get_solving_optionsmethodReturn calibration solving options as a raw dictionary.
edit_solving_optionsmethodUpdate calibration solving options with a complete object or partial dictionary.
set_solving_timesmethodUpdate output sampling periods.
download_bundlemethodDownload this calibration snapshot's input bundle as a zip archive.
performancemethodReturn calibration performance metrics.
objective_weightsmethodReturn objective weights used by this calibration.
results_summarymethodReturn a summary of calibration results.
resultspropertyAccess calibration result helper methods.

run​

run() -> None

Start this calibration run.

stop​

stop() -> Any

Stop a running calibration.

status​

status() -> dict[str, Any]

Return calibration status with metadata.

wait_until_completed​

wait_until_completed(
*, timeout: float | None = None, poll_interval: float = 5.0
) -> Any

Poll status until calibration reaches a terminal state or timeout.

get_sanity​

get_sanity() -> Any

Return the pre-launch sanity report (model/protocol/output-set/scorings/data-tables/parameters/options/solving-times).

get_solving_times​

get_solving_times(
*,
revision: int | None = None,
duration_format: Literal["iso8601", "timedelta"] = "iso8601"
) -> tuple[dict[str, timedelta | str], list[dict[str, timedelta | str]]]

Return base and additional output sampling periods.

The returned dictionaries have t_min, t_max, and t_step keys. Values are ISO 8601 strings by default, preserving expressions such as P1W. Set duration_format="timedelta" to convert them using Jinko's fixed year (365.25 days), month (one twelfth of a year), and week (7 day) lengths. Use jinko.iso8601 for these same conversions in custom code.

get_solving_options​

get_solving_options(
*,
revision: int | None = None,
duration_format: Literal["iso8601", "timedelta"] = "iso8601"
) -> dict[str, Any]

Return calibration solving options as a raw dictionary.

Solving-time durations are ISO 8601 strings by default. Set duration_format="timedelta" to convert them.

edit_solving_options​

edit_solving_options(
solving_options: dict[str, Any], *, version: str | dict | None = None
) -> Calibration

Update calibration solving options with a complete object or partial dictionary.

solvingTimes accepts timedelta values or ISO 8601 strings. Strings are validated and sent unchanged; timedeltas use fixed day and sub-day units.

set_solving_times​

set_solving_times(
*,
t_max: timedelta | str,
t_step: timedelta | str,
t_min: timedelta | str = timedelta(0),
additional_periods: Sequence[dict[str, timedelta | str]] = (),
version: str | dict | None = None
) -> Calibration

Update output sampling periods.

t_min, t_max and t_step are the parameters of the mandatory simulation-wide period. Each accepts a timedelta or ISO 8601 string. Timedeltas are emitted with fixed day and sub-day units, so a seven-day timedelta is sent as P7D. ISO 8601 strings are validated and sent unchanged, preserving expressions such as P1W and P1M. Use jinko.iso8601 for these same conversions in custom code.

It must contain every additional period: its t_min must be no greater and its t_max no less than each additional period.

additional_periods optionally add shorter sampling windows and may be in any order. Each period needs a positive t_step and t_min <= t_max. Example: [{"t_min": timedelta(0), "t_max": "P28D", "t_step": "P1D"}]. t_min defaults to timedelta(0), for both the base and additional periods.

download_bundle​

download_bundle() -> bytes

Download this calibration snapshot's input bundle as a zip archive.

performance​

performance() -> Any

Return calibration performance metrics.

objective_weights​

objective_weights() -> Any

Return objective weights used by this calibration.

results_summary​

results_summary() -> Any

Return a summary of calibration results.

results​

Type: CalibrationResults

Access calibration result helper methods.