Creator · NVIDIA
Last updated · Sep 6, 2026
DALI imperative dynamic mode (`nvidia.dali.experimental.dynamic`, ndd): use when working on ndd code or migrating pipelines; skip pipeline-only tasks.
Sandbox only
Install targets
Codex install prompt
Install the "dali-dynamic-mode" agent skill from https://github.com/NVIDIA/skills/tree/main/skills/dali-dynamic-mode. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: DALI imperative dynamic mode (`nvidia.dali.experimental.dynamic`, ndd): use when working on ndd code or migrating pipelines; skip pipeline-only tasks. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"nvidia-dali-dynamic-mode","task":"Install dali-dynamic-mode","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add NVIDIA/skills --skill dali-dynamic-mode
Maintenance
fresh
1d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
3.2K
82/100 Quality · 80/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
3.2K GitHub stars
Repo activity
3.2K stars, 376 forks
Maintenance
1d since push
License
Apache-2.0
Install
npx skills add NVIDIA/skills --skill dali-dynamic-mode
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add NVIDIA/skills --skill dali-dynamic-modeDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
31.0K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20dali-dynamic-mode%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20dali-dynamic-mode%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/nvidia-dali-dynamic-mode/install
Agent should check
Copy prompt
Task: Use dali-dynamic-mode in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20dali-dynamic-mode%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/nvidia-dali-dynamic-mode/install
Install command: npx skills add NVIDIA/skills --skill dali-dynamic-mode
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/nvidia-dali-dynamic-mode/install
LLM text format
/api/skills/nvidia-dali-dynamic-mode/install?format=text
Find alternatives
/api/skills/search?q=dali-dynamic-mode&limit=3
Agent prompt
Use dali-dynamic-mode for this task. Review https://www.openagentskill.com/api/skills/nvidia-dali-dynamic-mode/install, then install with: npx skills add NVIDIA/skills --skill dali-dynamic-modeRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/nvidia-dali-dynamic-mode
LLM text
/api/registry/manifest/nvidia-dali-dynamic-mode?format=text
Install alias
/api/registry/install/nvidia-dali-dynamic-mode
Recommend
/api/registry/recommend?task=Use%20dali-dynamic-mode%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS3.2K GitHub stars
Stars/forks activity
PASS3.2K stars, 376 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Process rich media
I need my agent to process images, video, or audio and extract useful information.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: dali-dynamic-mode description: "DALI imperative dynamic mode (`nvidia.dali.experimental.dynamic`, ndd): use when working on ndd code or migrating pipelines; skip pipeline-only tasks." license: Apache-2.0 metadata: author: "DALI Team <dali-team@nvidia.com>" tags: - dali - dynamic-mode - ndd - data-loading - data-processing - gpu-processing languages: - python team: dali domain: deep-learning ---
# DALI Dynamic Mode
## Purpose
Guide AI agents in writing, reviewing, and migrating code that uses DALI's imperative dynamic-mode API, `nvidia.dali.experimental.dynamic` (`ndd`).
## Instructions
- Import dynamic mode as `nvidia.dali.experimental.dynamic as ndd` and write code as direct `ndd` calls in ordinary Python; do not use pipeline-mode APIs such as `Pipeline`, `@pipeline_def`, `pipe.build()`, or `pipe.run()`. - Treat readers as stateful: create them once, reuse them across epochs, and pass `batch_size` to `next_epoch(...)`. - Pass explicit `batch_size` to random ops; there is no pipeline-level batch size to inherit. - Use dynamic-mode API conventions: `device="gpu"` instead of pipeline-mode `"mixed"`, `Batch.tensors[...]` for sample selection, and `Batch.slice[...]` for per-sample slicing. - Use `.torch()` to convert a tensor or batch to a PyTorch tensor. Use `pad=True` for batches with variable shapes.
## Prerequisites
- To run or validate code, NVIDIA DALI must be installed with dynamic mode importable as `nvidia.dali.experimental.dynamic`. - GPU decode or GPU operators require a CUDA-capable DALI build and an available NVIDIA GPU/driver. - Framework conversion examples require the target framework installed, such as PyTorch for `.torch()`.
## Introduction
Dynamic mode is DALI's imperative Python API. It lets code call DALI operators directly from normal Python control flow instead of building and running a pipeline graph.
## Core Data Types
### Tensor -- single sample
```python t = ndd.tensor(data) # copy t = ndd.as_tensor(data) # wrap, no copy if possible t.cpu() # move to CPU t.gpu() # move to GPU t.torch(copy=False) # conversion to PyTorch tensor with no copy (default) t[1:3] # slicing supported np.asarray(t) # NumPy via __array__ (CPU only) ```
Supports `__dlpack__`, `__cuda_array_interface__`, `__array__`, arithmetic operators.
### Batch -- collection of samples (variable shapes OK)
```python b = ndd.batch([arr1, arr2]) # copy b = ndd.as_batch(data) # wrap, no copy if possible ```
**Batch has no `__getitem__`** -- `batch[i]` raises `TypeError` because indexing is ambiguous (sample selection vs. per-sample slicing). Use the explicit APIs instead:
| Intent | Method | Returns | |--------|--------|---------| | Get sample i | `batch.tensors[i]` | `Tensor` | | Get subset of samples | `batch.tensors[slice_or_list]` | `Batch` | | Slice within each sample | `batch.slice[...]` | `Batch` (same batch_size) | | Sample-wise slicing | `batch.slice[batch_of_indices]` | `Batch` (same batch_size) |
`.tensors[]` picks **which samples**. `.slice` indexes **inside each sample**.
```python xy = ndd.random.uniform(batch_size=16, range=[0, 1], shape=2) crop_x = xy.slice[0] # Batch of 16 scalars, first element from each sample crop_y = xy.slice[1] # Batch of 16 scalars, second element from each sample sample_0 = xy.tensors[0] # Tensor, the entire first sample [x, y] ```
### Advanced slicing
The `.slice[]` API accepts batches of indices, allowing the user to mix and match batches and scalar values, e.g.: ```python imgs = ndd.imread(filenames) # a batch of images, if `filenames` is a list sliced = imgs.slice[ 42 : # the range start is broadcast to all samples ndd.batch(imgs.shape).slice[0] // 2 # per-sample range stop (half of each image) ] ```
**PyTorch conversion:** - `batch.torch()` -- works for uniform shapes; raises for ragged batches - `batch.torch(pad=True)` -- zero-pads ragged batches to max shape (use for variable-length audio, detection boxes, etc.) - `batch.torch(copy=None)` is the default (avoids copy if possible) - Batch has **no `__dlpack__`** -- use `ndd.as_tensor(batch)` first for DLPack consumers. `ndd.as_tensor` supports `pad` as well. - `Tensor.torch(copy=False)` is default (no copy)
**Iteration:** `for sample in batch:` yields Tensors.
## Readers
Readers are **stateful objects** -- create once, reuse across epochs. This matters because readers track internal state like shuffle order and shard position.
```python reader = ndd.readers.File(file_root=image_dir, random_shuffle=True)
for epoch in range(num_epochs): for jpegs, labels in reader.next_epoch(batch_size=64): # jpegs, labels are Batch objects ... ```
Key points: - Reader outputs (jpegs, labels, etc.) are **CPU** tensors/batches. Labels typically stay on CPU until you convert them for your framework (e.g. `labels.torch().to(device)`). - Reader classes are **PascalCase**: `ndd.readers.File(...)`, `ndd.readers.COCO(...)`, `ndd.readers.TFRecord(...)` - `batch_size` goes to `next_epoch()`, not to the reader constructor - `next_epoch(batch_size=N)` yields tuples of `Batch`; `next_epoch()` without batch_size yields tuples of `Tensor` - The iterator from `next_epoch()` must be fully consumed before calling `next_epoch()` again - Once a reader is used with a given batch_size, it cannot be changed. Similarly, a reader used in batch mode cannot switch to sample mode or vice versa.
Sharded reading for distributed training: ```python reader = ndd.readers.File( file_root=image_dir, shard_id=rank, num_shards=world_size, stick_to_shard=True, pad_last_batch=True, ) ```
## Device Handling
- Device is **inferred from inputs** -- GPU if any input is on GPU - For hybrid decode: use `device="gpu"` (NOT `"mixed"`). The `"mixed"` keyword is a pipeline-mode concept for implicit CPU-to-GPU transfer; in dynamic mode, passing `device="gpu"` triggers the same hardware-accelerated decode path. - Don't call `.cpu()` before passing to a GPU model -- `.torch()` gives you a GPU tensor directly. `.cpu()` is only needed for consumers requiring host memory (numpy, `__array__`). - CUDA stream sync between DALI and PyTorch is **automatic via DLPack** -- no manual stream management needed.
## Execution Model
Default mode is `eager` -- async execution in a background thread, returns immediately.
**No `.evaluate()` needed in most cases.** Any data consumption (`.torch()`, `__dlpack__`, `__array__`, `.shape`, property access, iteration) triggers evaluation automatically.
For debugging, switch to synchronous mode so errors surface at the exact call site rather than later in the async queue:
```python with ndd.EvalMode.sync_cpu: images = ndd.decoders.image(jpegs, device="gpu") images = ndd.resize(images, size=[224, 224]) # Any error surfaces here, at the exact op that failed ```
Modes (increasing synchronicity): `deferred` < `eager` < `sync_cpu` < `sync_full`
Use `EvalMode.sync_full` for debugging instead of scattering `.evaluate()` calls -- it's cleaner and catches all issues at once. `sync_cpu` is often sufficient and lighter than `sync_full`.
## Thread Configuration
```python ndd.set_num_threads(4) # Call once at startup, only if necessary to override the defaults ```
Controls DALI's internal worker threads for CPU operators. Defaults to CPU affinity count or `DALI_NUM_THREADS` env var. Unrelated to Python-level threading.
## RNG
Two approaches (use one, not both):
```python # Approach 1: set the thread-local default seed (simple, good enough for most cases) ndd.random.set_seed(42) angles = ndd.random.uniform(batch_size=64, range=(-30, 30))
# Approach 2: explicit RNG object (finer control, pass rng= to each op) rng = ndd.random.RNG(seed=42) values = ndd.random.uniform(batch_size=64, range=[0, 1], shape=2, rng=rng) ```
When `rng=` is passed to a random op, the explicit RNG overrides the default seed. Thread-local: each thread has independent random state.
Random ops need an explicit `batch_size` when working with batches -- there is no pipeline-level batch size to inherit.
## Checkpointing
Dynamic mode has **no pipeline-level checkpoint**. Checkpoints aggregate the state of individual stateful objects: readers and `RNG` instances. Stateless ops (decoders, resize, rotate, normalize, ...) are not part of a checkpoint.
```python ckpt = ndd.checkpoint.Checkpoint() ckpt.register(reader, "my_reader") ckpt.register(rng, "rng")
# ... iterate for a while ...
ckpt.collect() # snapshot the registered objects ckpt.save("ckpt_{seq:04d}.json") # writes ckpt_0000.json, ckpt_0001.json, ... ```
Restoring is the symmetric operation -- build a *fresh* reader and `RNG`, then `load` + `register`. The loaded state is applied to each object at `register` time:
```python reader = ndd.readers.File(file_root=..., enable_checkpointing=True, name="my_reader") rng = ndd.random.RNG()
ckpt = ndd.checkpoint.Checkpoint() ckpt.load("ckpt_{seq:04d}.json") # picks the highest sequence number ckpt.register(reader, "my_reader") # state applied here ckpt.register(rng, "rng") # ditto
for batch in reader.next_epoch(batch_size=N): ... # produces the next batch after the checkpointed iteration ```
Key rules:
- **Readers must opt in.** Construct with `enable_checkpointing=True`. Registering an already-iterated reader without it raises `RuntimeError`; if the reader has not been iterated yet, `register` enables it retroactively. - **Reader state must be applied before the first `next_epoch` call.** The prefetch thread starts on first iteration and the snapshot queue is locked after that. `set_state` (or a `register` from a loaded checkpoint) on an already-iterated reader raises `RuntimeError`. - **`enable_checkpointing=True` is incompatible with `compile=True`.** Calling `reader.next_epoch(..., compile=True)` on a checkpointing-enabled reader raises `NotImplementedError`. - **Named registration is safer.** Anonymous `register(op)` uses sequential keys (`__op_0`, `__op_1`, ...) so the registration order must match between save and restore. Type tags catch cross-type swaps but not reorders of compatible types. Prefer `register(op, name)`. - **`ndd.checkpoint.current()`** returns the `Checkpoint` bound to the current thread-local `EvalContext`. It's shared across calls -- call `ckpt.clear()` if reusing the default context for unrelated runs. - **Filename pattern:** `save`/`load` take a Python format string with a single `{seq}` placeholder (e.g. `"ckpt_{seq:04d}.json"`). `save` picks the next free sequence; `load` picks the highest matching one on disk. - **Format version is strict.** `deserialize` rejects payloads from a different checkpoint format version -- no automatic upgrade. - **Not thread-safe.** One `Checkpoint` per thread.
Manual `get_state` / `set_state` is also available directly on each `Reader` and `RNG` -- the `Checkpoint` aggregator is built on top of it. Use the manual API only when integrating with an external checkpoint system.
## Examples
### Image Classification Pipeline
```python import nvidia.dali.experimental.dynamic as ndd
reader = ndd.readers.File(file_root="/data/imagenet/train", random_shuffle=True)
for epoch in range(num_epochs): for jpegs, labels in reader.next_epoch(batch_size=64): images = ndd.decoders.image(jpegs, device="gpu") images = ndd.resize(images, size=[224, 224]) images = ndd.crop_mirror_normalize( images, mean=[0.485 * 255, 0.456 * 255, 0.406 * 255], std=[0.229 * 255, 0.224 * 255, 0.225 * 255], ) train_step(images.torch(), labels.torch()) ```
## Common Mistakes
| Wrong | Right | Why | |-------|-------|-----| | `device="mixed"` | `device="gpu"` | `"mixed"` is pipeline mode only | | `batch[i]` | `batch.tensors[i]` | `Batch` has no `__
Source provenance
Decision snapshot
3,213 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for dali-dynamic-mode, ready for a manual X post.
A practical pick for a repeatable workflow: dali-dynamic-mode: DALI imperative dynamic mode (`nvidia.dali.experimental.dynamic`, ndd): use when working on ndd code or migrating pipelines... 3.2K stars https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode?ref=x
Listing + install path for dali-dynamic-mode: https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode?ref=x Install: npx skills add NVIDIA/skills --skill dali-dynamic-mode
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to NVIDIA but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode/audit)
[](https://www.openagentskill.com/skills/nvidia-dali-dynamic-mode?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)NVIDIA
@nvidia
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
31.0K StarsPermission surface
secrets or environment access, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness