Repository navigation
feat(rendering): add scoped denoising pipeline config - #666
Conversation
|
| from typing import Any, Literal, Sequence, TYPE_CHECKING | ||
|
|
||
| import numpy as np | ||
| import torch | ||
|
|
||
| from embodichain.utils import configclass, logger |
There was a problem hiding this comment.
Missing guarded type import
physics.py uses NewtonSolverCfg in a public annotation but never imports it. The developer guide requires public APIs to be fully annotated and circular imports to be guarded with TYPE_CHECKING. Add the guarded import to satisfy this repository requirement before merging.
| from typing import Any, Literal, Sequence, TYPE_CHECKING | |
| import numpy as np | |
| import torch | |
| from embodichain.utils import configclass, logger | |
| from typing import Any, Literal, Sequence, TYPE_CHECKING | |
| import numpy as np | |
| import torch | |
| from embodichain.utils import configclass, logger | |
| if TYPE_CHECKING: | |
| from dexsim.engine.newton_physics.solvers_cfg import NewtonSolverCfg |
Context Used: CLAUDE.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/cfg/physics.py
Line: 26-31
Comment:
**Missing guarded type import** `physics.py` uses `NewtonSolverCfg` in a public annotation but never imports it. The developer guide requires public APIs to be fully annotated and circular imports to be guarded with `TYPE_CHECKING`. Add the guarded import to satisfy this repository requirement before merging.
```suggestion
from typing import Any, Literal, Sequence, TYPE_CHECKING
import numpy as np
import torch
from embodichain.utils import configclass, logger
if TYPE_CHECKING:
from dexsim.engine.newton_physics.solvers_cfg import NewtonSolverCfg
```
**Context Used:** CLAUDE.md ([source](https://github.com/dexforce/embodichain/blob/main/CLAUDE.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Add an EmbodiChain-owned denoising/reconstruction configuration layer for the ray-tracing pipeline introduced by DexSim !1416, updated for DexSim 0.5.1rc1.
Summary
DenoisingCfgwith independentwindowandoffscreenselectionsoff,optix,dlss, andnrd;dlssmaps toDLSS_RRandnrdmaps to standaloneNRD_RELAXNRDCfgfor NRD algorithm tuning while keeping native RELAX/REBLUR selection out of the public mode stringsDLSSCfgwith DexSim's 0.5.1rc1 mode-based API and tiled multi-camera settingsexamples/sim/rendering/denoising_config.pyDependency and compatibility
dexsim_engine==0.5.1rc1. Local validation used DexSim0.5.1rc1at93229769e1.DLSSCfg.dlss_enabledandDLSSCfg.upscale_enabledare replaced by the selected denoising/reconstruction mode.mainand includes the DexSim 0.5.1rc1 compatibility update.Type of change
Screenshots
The benchmark writes
comparison.pngwith OptiX/DLSS/NRD frames and amplified difference images underoutputs/benchmarks/.Validation
black --check --diff --color ./python docs/scripts/check_api_docs.py— 2397/2397 exports documentedpython examples/sim/rendering/denoising_config.py --window optix --offscreen nrd --dlss-quality 3 --nrd-history-frames 24python -m scripts.benchmark.rendering.offscreen_denoisingOffscreen benchmark (RTX 5090)
FastRT, 640×360, 1 spp for every mode, DLSS quality 3, 12 warmup frames, 40 measured frames, and 12 quality frames along the same moving-camera/object path. OptiX at 1 spp is the user-selected quality reference, so PSNR/SSIM measure reference consistency rather than absolute ground-truth fidelity. This run uses DexSim 0.5.1rc1.
On this scene, standalone NRD is 11.6% faster than DLSS by median latency and reaches 13.1% higher FPS. DLSS remains closer to the OptiX reference: +4.73 dB PSNR, +0.0245 SSIM, and 48.2% lower MAE than NRD. NRD uses 175 MiB less peak process VRAM in this run.
Full-suite caveats:
pytestis blocked during collection because the local environment lacks optionalgradiofor two GenSim UI test modulesTestArticulationNewton.test_reset_restores_default_link_mass_propertieson a separate preexisting world-mask pathAgent context review
simulation-systemrendering guidance for the 0.5.1rc1 native mode names and public EmbodiChain mapping.env-framework,robot-system, anddifferentiable-envrequired no prose change; their existing ownership boundaries remain accurate.Checklist
black .command to format the code base.python docs/scripts/check_api_docs.py).