<< All versions
Skill v1.0.0
currentAutomated scan100/100jxoesneon/ciel/ciel-ml-and-data-patterns
──Details
PublishedSeptember 28, 2026 at 12:13 AM
Content Hashsha256:49a3b5d956c6bb07...
Git SHA0a73bb6da1f0
──Files
Files (1 file, 1.7 KB)
SKILL.md1.7 KBactive
SKILL.md · 39 lines · 1.7 KB
version: "1.0.0" name: ciel-ml-and-data-patterns description: CIEL's framework for PyTorch ML patterns and Postgres data optimization. license: MIT metadata: ciel-version: 1.0.0 ciel-extension: ciel.yaml
CIEL ADAPTATION: ML & Data (The Intelligence Layer)
This skill manages high-performance data patterns, from deep learning training loops to SQL query optimization.
PyTorch ML Patterns
- Device-Agnostic: ALWAYS use
device = torch.device(...). Prohibit hardcoded.cuda()calls. - Reproducibility: Set seeds for
torch,np, andrandomin a centralset_seed()function. - Shape Integrity: Annotate and verify tensor shapes in the
forward()pass comments. - Efficiency: Use
optimizer.zero_grad(set_to_none=True)andmodel.eval()for validation.
Postgres Data patterns
- Indexing: Equality columns first, then range columns. Use
GINfor JSONB andBRINfor time-series. - Types: Use
bigintfor IDs,timestamptzfor times, andtextfor variable strings. - Pagination: Use keyset/cursor pagination (
WHERE id > $last_id) instead ofOFFSETfor O(1) performance. - Security: Wrap RLS policies in
(SELECT auth.uid()) = user_idfor optimization.
Memory Management
- AMP: Use
torch.amp.GradScalerfor mixed-precision performance. - Checkpointing: Save
model_state_dictANDoptimizer_state_dictto allow resuming training.
Anti-Patterns
- In-place Mutation: Using
x += residualin PyTorch (breaks autograd). Usex = x + residual. - Small Inserts: Performing SQL inserts in a loop instead of batching.
- Select \*: Reading every column in SQL (causes unnecessary I/O bloat).