Skip to content

feat: add quoting support to to_dict (#1052) #1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clumsy
Copy link
Contributor

@clumsy clumsy commented Apr 24, 2025

See #1052

Test plan:
[x] all existing test cases pass

[x] add new test case

[x] test locally:

Given:

[component:dist.ddp]
script=test.py
env=
	NCCL_IB_HCA='=mlx5_0:1,mlx5_1:1';

Observe:

test/0 [7]:environ({...'NCCL_IB_HCA': '=mlx5_0:1,mlx5_1:1', ...})

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 24, 2025
@clumsy
Copy link
Contributor Author

clumsy commented Apr 24, 2025

Please consider this PR, @kiukchung, @d4l3k, @tonykao8080 and sorry for using regex 🙂

@andywag
Copy link
Contributor

andywag commented Apr 25, 2025

Why use quotes instead of the more standard escape pattern?

@clumsy
Copy link
Contributor Author

clumsy commented Apr 25, 2025

No particular preference besides being convenient to see the exact value without unescaping, @andywag - would be happy with any working solution.

Do you think an alternative mechanism is more desirable? Do you mean escaping like \=?

@andywag
Copy link
Contributor

andywag commented Apr 26, 2025

Yeah, I prefer the more standard escape like you mention but am fine with this since it's working.

Copy link
Contributor

@andywag andywag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@facebook-github-bot
Copy link
Contributor

@andywag has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants