Make functional tests cover examples/converters/*
- Dominant language
- Python
- Stars
- 2k
- Forks
- 561
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 145
Description
## Current State
`test_converter_roundtrip.py` already covers the core conversion logic, but it has meaningful gaps:
### What is covered
- `merge_lora_to_hf()` from `convert_lora_to_hf.py` (called directly via `importlib`)
- `convert_dcp_to_hf()` from `nemo_rl.utils.native_checkpoint` (the underlying library function)
- `export_model_from_megatron()` from `nemo_rl.models.megatron.community_import` (the underlying library function)
### What is NOT covered
- The CLI entry points of `convert_dcp_to_hf.py` and `convert_megatron_to_hf.py` — their `parse_args()` + `main()` paths are never exercised
- `convert_lora_to_hf.py`'s own `main()` is also not invoked — only the inner function is imported
### Recommend Implementation
make `test_converter_roundtrip.py` to a util py, it will have something like `create_ckpt`, `check_equal` or some other utils. then in `test_converters.sh`, we do the following things for each convert.
1. create ckpt
2. run entry point to convert (e.g. `convert_dcp_to_hf.py`)
3. check equal or something
Contributor guide
Assessment
This issue has not been assessed yet.