← JinkōCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Jinkō
Snapshot Sep 30, 2026 · 23:13 UTC · version 1.8.0
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "jinko-output-set",
"description": "Create, inspect, validate, and incrementally edit Jinkō output sets via the jinko-sdk: simple output sets (measure designs) that list scalar measures derived from model outputs, and advanced output sets (scoring designs) that define constraints, scalars, and weighted objectives for scoring virtual populations. Validate scoring expressions and read diagnostics before attaching an output set elsewhere. Do not use this skill for attaching a simple or advanced output set to a trial and running it; use jinko-trial for that. Do not use this skill for data-table creation or fitness-function metadata; use jinko-data-table for that. Do not use this skill for calibration setup or CMA-ES options.",
"included_files": [
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 257
},
{
"relative_path": "assets/advanced_output_set_example.json",
"size_in_bytes": 528
},
{
"relative_path": "evals/evals.json",
"size_in_bytes": 2571
},
{
"relative_path": "references/advanced-output-set.md",
"size_in_bytes": 8984
},
{
"relative_path": "references/formula-language.md",
"size_in_bytes": 7865
},
{
"relative_path": "references/simple-output-set.md",
"size_in_bytes": 4175
},
{
"relative_path": "scripts/create_advanced_output_set.py",
"size_in_bytes": 11732
},
{
"relative_path": "scripts/create_simple_output_set.py",
"size_in_bytes": 4229
},
{
"relative_path": "scripts/edit_advanced_output_set.py",
"size_in_bytes": 15763
},
{
"relative_path": "scripts/inspect_output_set.py",
"size_in_bytes": 3538
}
],
"skill_md_contents": "---\nname: jinko-output-set\ndescription: >-\n Create, inspect, validate, and incrementally edit Jinkō output sets via the\n jinko-sdk: simple output sets (measure designs) that list scalar measures\n derived from model outputs, and advanced output sets (scoring designs) that\n define constraints, scalars, and weighted objectives for scoring virtual\n populations. Validate scoring expressions and read diagnostics before\n attaching an output set elsewhere. Do not use this skill for attaching a\n simple or advanced output set to a trial and running it; use jinko-trial for\n that. Do not use this skill for data-table creation or fitness-function\n metadata; use jinko-data-table for that. Do not use this skill for calibration\n setup or CMA-ES options.\ncompatibility: >-\n Check set-up with the `jinko-sdk-setup` skill. Creating output sets requires\n write access to the Jinkō project; simple output sets also require an\n existing model. Advanced output sets can be created standalone. Objective\n preview rendering benefits from IPython and matplotlib but degrades to\n plain text without them.\nmetadata:\n author: Nova In Silico\n requires_sdk: \">=1.8,<2.0\"\nlicense: MIT\n---\n\n# Jinkō Output Set SDK Workflows\n\nUse this skill for output-set mechanics through the SDK: creating, validating, inspecting, and incrementally editing simple and advanced output sets.\nKeep trial attachment in `jinko-trial`, calibration attachment in `jinko-calibration-cmaes`, and data tables in `jinko-data-table`.\n\n> **PREREQUISITE:** This skill needs an initialized `jinko-sdk` connection and an\n> SDK satisfying its `metadata.requires_sdk` range. Run the `jinko-sdk-setup` skill\n> (`../jinko-sdk-setup/SKILL.md`) and proceed only once its check passes. If that\n> skill is not found, install it from `novainsilico/jinko-skills`.\n\n## Core Concepts\n\nJinkō uses different names for the same objects in the UI, the API, and the SDK.\n\n| UI wording | API project-item type | SDK entry points |\n| -------------------- | ---------------------- | -------------------------------------------------------------- |\n| Simple output set | `MeasureDesign` | `client.create_simple_output_set(...)`, `SimpleOutputSet` |\n| Advanced output set | `ScoringDesign` | `client.create_advanced_output_set(...)`, `AdvancedOutputSet` |\n\nAn advanced output set groups three component kinds: constraints (boolean per-patient eligibility expressions), scalars (numeric formulas derived from simulation output), and objectives (range-based scoring rules with a weight).\nScalars serialize under the raw JSON key `components.measures` — do not confuse with simple-output-set \"measures\".\n\n## Discovering Output Ids\n\nNever invent output ids.\nCall `model.time_dependent_ids()` to discover the model's valid output ids before creating a simple output set, same as `jinko-trial` does.\nAdvanced-output-set formulas reference output ids or other scalar ids by name.\nScoring-formula time values are always seconds, regardless of the model time\nunit. Formulas do not support time-unit annotations: convert scientific times\nexplicitly. Consequently, `int(X)` and `auc(X)` have a seconds time component;\ndeclare their scalar units with `*s`.\nIf unsure whether a piece of formula syntax is still supported, validate it with `client.validate_scoring_formula(...)` rather than assuming old examples still apply.\nRead `references/formula-language.md` before writing any non-trivial constraint/scalar/objective formula or component filter. It gives the actual grammar (time reduction functions, time indexing, arm references) and documents validation messages.\n\n## Simple Output Set Workflow\n\n```python\nmodel = client.get_model(\"cm-...\")\noutput_set = client.create_simple_output_set(model, model.time_dependent_ids())\n# Equivalently: model.create_simple_output_set([...])\n```\n\nMeasures accept output-id strings (shorthand for `{\"timeseriesId\": id}`) or dicts for custom names, origins, and point-in-time/across-time functions.\nEdit with `.content()`, `.measures`, `.replace_all_measures()`, `.add_measures()`, `.remove_measures()`, `.update_measure()`.\nSee `references/simple-output-set.md` for the full schema.\n\n## Advanced Output Set Workflow\n\n```python\nscoring_design = client.create_advanced_output_set(\n constraints=[{\"id\": \"adults\", \"constraint\": \"age >= 18\"}],\n scalars=[{\"id\": \"auc\", \"formula\": \"auc(Drug)\", \"unit\": \"mg/L*s\"}],\n objectives=[\n {\n \"id\": \"obj_auc\",\n \"formula\": {\n \"target\": \"auc(Drug)\",\n \"range\": {\n \"narrowRangeLowBound\": 8.0,\n \"narrowRangeHighBound\": 12.0,\n \"wideRangeLowBound\": 5.0,\n \"wideRangeHighBound\": 15.0,\n },\n },\n \"weight\": 1.0,\n }\n ],\n name=\"PK scoring\",\n)\n```\n\nAdd components incrementally with `scoring_design.components.add_constraint(...)`, `.add_scalar(...)`, `.add_objective(...)` — each call creates a new versioned snapshot. For a batch, validate every component and check all ids for conflicts before the first call; if a later request fails, report the ids already applied.\nSee `references/advanced-output-set.md` for full schemas, the components service, and the raw JSON escape hatch.\n\n## Validation & Diagnostics\n\nConstraint and formula expressions are validated automatically inside `create()` and `components.add_*()`.\nThey always raise `ValidationError` on failure — `show_validation` only controls whether a report is printed, it does not suppress the raise.\n\n```python\nif scoring_design.diagnostics.errors():\n print(scoring_design.diagnostics.errors().explain())\n```\n\n`sd.diagnostics` is chainable: `.for_kind(...)`, `.with_severity(...)`, `.with_code(...)`, `.for_component(...)`, `.errors()`, `.warnings()`, `.has_errors()`, `.by_component()`, `.by_kind()`, `.by_severity()`, `.explain()`.\nUse `sd.diagnostics_at(revision)` for a historical snapshot.\n\n**What this validates, and what it does not.** `client.validate_scoring_formula(...)`/`validate_scoring_condition(...)` and `sd.diagnostics` only check the scoring design in isolation — formula syntax, referenced ids resolving to *something*, constraint/objective shape.\nThey do not know about any concrete trial. A formula can pass every check here and still fail once the advanced output set is bound to a trial (e.g. it references a measure that exists on this model but not on the trial's simple output set, or a unit/time-window mismatch with the trial's protocol).\nPassing standalone validation is necessary, not sufficient, for trial compatibility — never report an advanced output set as \"trial-ready\" based on this skill's checks alone. Use `jinko-trial`'s trial-sanity step (`trial.sanity()`) once the output set is attached to a concrete trial.\n\n## Attaching to Trials/Calibrations\n\nThis skill only creates, inspects, and edits output sets — it does not attach them or run anything, and it cannot confirm trial compatibility (see above).\nFor trials, use `jinko-trial`: `model.create_trial(simple_output_set=..., advanced_output_set=..., ...)`, then run `trial.sanity()` before launch — see `jinko-trial`'s pre-launch check.\nFor calibrations, use `jinko-calibration-cmaes` for the SDK call (`model.create_calibration(simple_output_set=..., advanced_output_set=..., ...)`).\nA calibration needs at least one fitness-function source: a data table with `validForFitnessFunction: True` (see `jinko-data-table`) and/or an advanced output set with objectives.\n\n## Bundled Scripts\n\n- `scripts/create_simple_output_set.py`: dry-run by default, creates a simple output set with `--apply`.\n- `scripts/create_advanced_output_set.py`: dry-run by default, creates an advanced output set with `--apply`.\n- `scripts/inspect_output_set.py`: inspects an existing simple or advanced output set.\n- `scripts/edit_advanced_output_set.py`: adds constraints/scalars/objectives to an existing advanced output set.\n\n```bash\npython skills/jinko-output-set/scripts/create_simple_output_set.py --model-sid cm-... --output-id Drug\npython skills/jinko-output-set/scripts/create_simple_output_set.py --model-sid cm-... --output-id Drug --folder 2026-07-07-output-sets --create-folder --apply\npython skills/jinko-output-set/scripts/create_advanced_output_set.py --constraint \"adults:age >= 18\" --scalar \"auc:auc(Drug)\" --name \"PK scoring\"\npython skills/jinko-output-set/scripts/create_advanced_output_set.py --from-json skills/jinko-output-set/assets/advanced_output_set_example.json --apply\npython skills/jinko-output-set/scripts/inspect_output_set.py --kind advanced --sid sc-... --diagnostics\npython skills/jinko-output-set/scripts/edit_advanced_output_set.py --sid sc-... --add-objective \"obj_auc:auc(Drug):8:12:5:15:1.0\" --show-diagnostics --apply\n```\n\n## Reference Routing\n\n- Read `references/simple-output-set.md` for measure dict shapes and editing methods.\n- Read `references/advanced-output-set.md` for constraint/scalar/objective shapes, validation, diagnostics, and tags.\n- Read `references/formula-language.md` for the constraint/scalar/objective formula grammar (functions, time indexing, arm references) and its pitfalls.\n"
}SHA-256: a3cbaa967ff7ff08894334a6d3ffd7909988a445fa81dd4655ccd6a922e9857a