graphify
GRGraphify-Labs/graphify155k2,124 new stars in the last 7 days
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.
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 |
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)Graph — PINA's built-in graph structure (from pina import Graph)Data — PyTorch Geometric Data object (from torch_geometric.data import Data)All three types are accepted directly as input/target.
Conditions map domain names (sampled later via discretise_domain) or explicit
point tensors to equations:
from pina import Condition
# Option 1: reference a domain by name (sampled later)
conditions = {
"boundary": Condition(domain="boundary", equation=FixedValue(0.0)),
"interior": Condition(domain="D", equation=Equation(my_pde)),
}
# Option 2: provide explicit points
conditions = {
"data_pde": Condition(input=points_tensor, equation=Equation(my_pde)),
}
conditions = {
"data": Condition(input=input_tensor, target=target_tensor),
}
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 windowsunroll_length — prediction horizon per windowrandomize — shuffle window orderkey — key for graph time series dataConditions become a class-level dict on the problem:
class MyProblem(SpatialProblem):
output_variables = ["u"]
spatial_domain = CartesianDomain({"x": [0, 1]})
domains = {
"D": spatial_domain,
"boundary": spatial_domain.partial(),
}
conditions = {
"boundary": Condition(domain="boundary", equation=FixedValue(0.0)),
"D": Condition(domain="D", equation=Equation(my_pde)),
}
LabelTensor, torch.Tensor,
Graph, or PyG Data)input_variables is a list[str] naming the inputsn_windows, unroll_length, and optional key
are set correctlyCondition uses valid keyword arguments:
Condition(domain=..., equation=...) for physics-on-domainCondition(input=..., equation=...) for physics-on-pointsCondition(input=..., target=...) for data-drivenCondition(input=..., n_windows=..., unroll_length=...) for time seriesdomains dict has an entry for every domain name used in conditionsGRGraphify-Labs/graphify155k2,124 new stars in the last 7 days
PApaperclipai/paperclip119k1,727 new stars in the last 7 days
NEnexu-io/open-design110k1,079 new stars in the last 7 days
HEheygen-com/hyperframes93k3,834 new stars in the last 7 days
BYbytedance/deer-flow86k245 new stars in the last 7 days
BYbytedance/deer-flow86k245 new stars in the last 7 days