Skip to content

[v10] Fix argparser issue#3085

Merged
basfroman merged 8 commits intoSDKv10from
feat/roman/argparser-issue
Oct 7, 2025
Merged

[v10] Fix argparser issue#3085
basfroman merged 8 commits intoSDKv10from
feat/roman/argparser-issue

Conversation

@basfroman
Copy link
Collaborator

@basfroman basfroman commented Oct 7, 2025

This PR refactors the Config class to dynamically respect the BT_NO_PARSE_CLI_ARGS environment variable, ensuring CLI argument parsing is enabled by default and can be explicitly disabled when needed.
This change prevents SDK crashes when it is used within external scripts that define their own CLI arguments overlapping with the SDK’s.

  • The environment variable is recognized when set to any of the following case-insensitive values: 1, true, yes, or on.
  • By default, BT_NO_PARSE_CLI_ARGS is not set, and CLI argument parsing remains active.
  • The local environment variable BT_NETWORK has been renamed to BT_SUBTENSOR_NETWORK for consistency with other Subtensor-related settings.

@MichaelTrestman — please note that the documentation needs to be updated to reflect:

  • the new environment variable BT_NO_PARSE_CLI_ARGS, and
  • the renamed variable BT_SUBTENSOR_NETWORK.

@basfroman basfroman requested a review from a team October 7, 2025 01:47
@basfroman basfroman self-assigned this Oct 7, 2025
@basfroman basfroman added the bug Something isn't working label Oct 7, 2025
@basfroman basfroman changed the title Fix argparser `issue [v10] Fix argparser issue Oct 7, 2025
@basfroman basfroman mentioned this pull request Oct 7, 2025
Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

Nice!

@basfroman basfroman merged commit 25bd5d2 into SDKv10 Oct 7, 2025
351 checks passed
@basfroman basfroman deleted the feat/roman/argparser-issue branch October 7, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants