Skip to content

Fix unsafe dictionary access in RCCL tests with proper defaults#102

Open
cijohnson wants to merge 1 commit intomainfrom
ichristo/fix_unsafe_dict_access_in_rccl_tests
Open

Fix unsafe dictionary access in RCCL tests with proper defaults#102
cijohnson wants to merge 1 commit intomainfrom
ichristo/fix_unsafe_dict_access_in_rccl_tests

Conversation

@cijohnson
Copy link
Copy Markdown
Contributor

  • Replace all config_dict['key'] with safe config_dict.get('key', 'default')
  • Add fallback defaults from rccl_config.json for all parameters
  • Update RCCL library paths to correct location (/opt/rocm/lib/librccl.so)
  • Remove unnecessary regex checks for 'None' strings
  • Ensure consistent string defaults matching JSON config format
  • Fix env_source_script handling with proper null checks

Benefits:

  • No more KeyError crashes when config parameters missing
  • Graceful fallbacks to sensible defaults
  • Robust tests that run with minimal config files
  • Consistent behavior across all RCCL test files

Made-with: Cursor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

- Replace all config_dict['key'] with safe config_dict.get('key', 'default')
- Add fallback defaults from rccl_config.json for all parameters
- Update RCCL library paths to correct location (/opt/rocm/lib/librccl.so)
- Remove unnecessary regex checks for 'None' strings
- Ensure consistent string defaults matching JSON config format
- Fix env_source_script handling with proper null checks

Benefits:
- No more KeyError crashes when config parameters missing
- Graceful fallbacks to sensible defaults
- Robust tests that run with minimal config files
- Consistent behavior across all RCCL test files

Made-with: Cursor
Signed-off-by: Ignatious Johnson <ichristo@amd.com>
@cijohnson cijohnson requested review from solaiys, speriaswamy-amd and venksrin09 and removed request for solaiys and speriaswamy-amd March 18, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant