npx skills add ...
npx skills add novainsilico/jinko-skills --skill jinko-trial
Create, sanity-check, run, poll, download results, and compute plot data for Jinkō in-silico trials via the jinko-sdk. Use this skill whenever the user wants to set up a trial from a computational model and simple output set, optionally attach a vpop, protocol, data table, or advanced scoring output set, launch a trial, wait for completion, inspect completed trials, download TimeSeries and Scalar results as pandas DataFrames, or get calculated plot data (scalar distributions, time-series quantile bands, survival curves, contribution/tornado analysis, per-patient scatter values), filtered or grouped by descriptors, to draw their own plots. Do not use this skill for model editing, vpop creation, protocol design authoring, data-table upload, output-set creation/editing, or configuring a stored TrialVisualization.
npx skills add novainsilico/jinko-skills --skill jinko-trial
Use this skill for trial setup, sanity checks, run/poll, and result download. Keep creation of upstream assets in their dedicated skills: jinko-model, jinko-vpop, jinko-protocol, jinko-data-table, and jinko-output-set (simple and advanced output sets).
PREREQUISITE: This skill needs an initialized
jinko-sdkconnection and an SDK satisfying itsmetadata.requires_sdkrange. Run thejinko-sdk-setupskill (../jinko-sdk-setup/SKILL.md) and proceed only once its check passes. If that skill is not found, install it fromnovainsilico/jinko-skills.
A minimum trial is composed of:
model.time_dependent_ids() as the default output ids when the user has not specified ids.Optional trial inputs:
Do not launch while trial sanity reports errors. Always confirm this by calling trial.sanity() — not by re-running standalone checks from upstream skills (validate_scoring_formula, client.validate_scoring_condition, scoring_design.diagnostics, etc.). Those checks only validate an asset in isolation; they cannot see how it behaves once bound to this concrete trial. trial.sanity() is the same trial-context check the Jinkō UI runs before launch and is the source of truth for launch-readiness — see references/trial-setup.md for the pre-launch workflow and errors after standalone validation passed troubleshooting.
Typical constraints surfaced by trial sanity:
obsId columns must correspond to model components.armScope values must correspond to protocol arms when a protocol is used.ADVANCED_OUTPUTS_ERRORS) even when jinko-output-set's standalone validation passed.If sanity errors are reported, show them and ask whether the user wants help fixing the upstream asset.
client.create_simple_output_set(model, model.time_dependent_ids()) unless explicit output ids were requested. See jinko-output-set for measure shapes and advanced output sets (constraints/scalars/objectives).client.create_trial(model, data_tables=..., vpop=..., protocol=..., simple_output_set=..., advanced_output_set=...).trial.edit_solving_options({...}); use trial.get_solving_options() to inspect raw ISO 8601 duration strings, or trial.get_solving_options(duration_format="timedelta") for timedelta values. For focused edits, use trial.set_solving_times(t_max=timedelta(days=28), t_step="P1D") with either representation.run()): trial.sanity() — returns a raw dict (the JSON response, not a typed object) with one component report per key (model, protocol, vpop, outputSet for the simple output set, scorings for the advanced output set, dataTables, solvingTimes), each with ["sanity"]["errors"]/["sanity"]["warnings"] and ["sanity"]["componentsSanity"] for per-component detail.trial.run().trial.wait_until_completed(timeout=1800).trial.output_ids().trial.results.summary().trial.results.timeseries({...}).to_dataframe().trial.results.scalars([...]).to_dataframe().TabularDownload.raw_bytes; result payloads may be CSV or zipped CSV.trial.results.aggregate_scalars(...), aggregate_timeseries(...), tornado_sensitivity(...), survival_analysis(...), scalars_per_population(...) (scatter). Filters and groups both come from the descriptor handles (age.gte(18), sex.in_levels([...]), auc.group_by_quantiles(4), sex.group_by_levels()), plus trial.results.group_by_arm(). No import beyond JinkoClient is needed. Query the trial directly and do not create a TrialVisualization just to read data. The same filter and group vocabulary configures a stored visualization in jinko-trial-viz.__jinko. These are platform telemetry, such as __jinkoSolvingTime, __jinkoAllocationMiB, and __jinkoNumSteps. They differ between any two runs of the same trial and carry no scientific meaning, so exclude them before comparing results, reporting agreement, or computing any metric.When data tables are attached, pass them through the supported data_tables= argument. Require each data table to report metadata.public.validForFitnessFunction is True before creating the trial; reject False, missing, and malformed values.
YYYY-MM-DD-<experiment-name>.client.get_folder_by_name(name, exact_match_only=True).--apply.folder=folder to trial creation calls. For simple output sets, create them first and then move them with output_set.move_to_folder(folder).run_v2.py, run_v3.py, and similar copies.trial.sanity() after the repair.These are on PATH as console scripts once the SDK is installed, and also
runnable via python -m as shown below.
jinko.cli.find_completed_trial_results: lists trials, finds the first completed one, prints its summary, and downloads TimeSeries and Scalar results to pandas DataFrames.jinko.cli.setup_and_run_trial: creates a simple output set, creates a trial from model plus optional assets, sanity-checks, optionally runs, polls, and optionally downloads results.Examples:
references/trial-setup.md for trial creation, the safe pre-launch sanity-check workflow, and troubleshooting ADVANCED_OUTPUTS_ERRORS/"The following advanced outputs have errors".references/trial-results.md for completed-trial discovery and result downloads.references/trial-plot-data.md for aggregate plot data, selectors, filters, and groups.