deepmodeling / deepmodeling/deepmd-kit

feat(jax): implement profiler lifecycle and trace output

Open
#5,871 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
2k
Forks
649
Avg merge
6d 18h
Merged PRs (30d)
15

Description

## Summary

The JAX trainer reads `training.profiling` and `training.enable_profiler`, but there is no complete profiler lifecycle or trace-export path in the training loop.

## Scope

- Define the intended semantics of both schema options for JAX.
- Start profiling at the configured lifecycle point, advance it with completed training steps, and stop it on normal or exceptional exit.
- Honor the configured trace/output path.
- Prevent output collisions between distributed ranks.
- Keep profiler control outside compiled/jitted train-step functions.
- Make the disabled path a true no-op.

## Acceptance criteria

- Each profiling option works independently and in combination according to documented semantics.
- A valid trace is produced at the configured path.
- Resources are finalized after both successful training and controlled failure.
- Distributed output names are deterministic and collision-free.
- Tests verify lifecycle ordering, disabled behavior, and trace creation without changing numerical training results.

Refs #5756.

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.