Set up conditions for PINA problems. Covers data types (LabelTensor, Graph, PyG Data), time series conditions, binding equations to domains, and data-driven input→target mapping.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
La commande reste sur une seule ligne. Faites défiler horizontalement pour la vérifier avant de la copier.
Vous préférez une copie locale ? Téléchargez les fichiers actuellement disponibles dans SkillsMP.
Affichage de SKILL.md
SKILL.md
Instructions source · Aperçu en lecture seule
name
condition-setup
description
Set up conditions for PINA problems. Covers data types (LabelTensor, Graph, PyG Data), time series conditions, binding equations to domains, and data-driven input→target mapping.
[!IMPORTANT]
Read RULES.md before using this skill — it applies to all skills.
This is a sub-skill of create-problem. Load the entry-point skill first.
Use this skill to define Condition objects that bind data, equations, or
time-series windows to the problem.
Step 1 — Determine the condition type
Three kinds of conditions exist in PINA:
Kind
When to use
Physics-on-domain
PDE/ODE residual on a sampled domain
Data-driven
Input→target mapping (supervised)
Time series
Rolling-window forecasting
Step 2 — Data types (data-driven only)
If the problem is data-driven, ask:
What data type are you using?
Available data types for Condition(input=..., target=...):
LabelTensor / torch.Tensor — standard tensor data (most common)
If the user has time series data, ask whether they want standard supervised
or time-series conditions:
from pina import Condition
# Standard supervised
Condition(input=ts_tensor, target=target_tensor)
# Time series (input is 3D: [batch, n_windows, features])
Condition(
input=ts_tensor,
n_windows=10,
unroll_length=5,
randomize=True,
)
# Graph time series
Condition(
input=graph_ts_data,
n_windows=10,
unroll_length=5,
key="some_key",
)
Parameters:
n_windows — number of rolling windows
unroll_length — prediction horizon per window
randomize — shuffle window order
key — key for graph time series data
Step 4 — Integrate with the problem class
Conditions become a class-level dict on the problem: