FIX-#7461: Set backend correctly with environment variables.#7462
Merged
sfc-gh-mvashishtha merged 6 commits intomodin-project:mainfrom Mar 11, 2025
Conversation
…les. Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
| def _warn_if_deprecated(cls) -> None: | ||
| """Warn that the variable is deprecated if it has a deprecation descriptor.""" | ||
| if cls._deprecation_descriptor is not None: | ||
| warnings.warn( |
Contributor
Author
There was a problem hiding this comment.
codecov is warning that I don't have coverage for this line, but I don't think it was covered anyway. I just moved the warning code.
| return _UNSET | ||
| raw = os.environ[cls.varname] | ||
| if not _TYPE_PARAMS[cls.type].verify(raw): | ||
| raise ValueError(f"Unsupported raw value: {raw}") |
Contributor
Author
There was a problem hiding this comment.
codecov is warning that I haven't covered this line with a test, but I don't think we had coverage for it anyway. I moved this check here from the body of Parameter.get()
Contributor
sfc-gh-joshi
left a comment
There was a problem hiding this comment.
Mostly LGTM, just a couple questions.
sfc-gh-jkew
previously approved these changes
Mar 11, 2025
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
Contributor
Author
|
Whoops @sfc-gh-joshi , I made a mistake in my last commit. I'll let you know when I've fixed it. |
sfc-gh-joshi
previously approved these changes
Mar 11, 2025
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
sfc-gh-dpetersohn
previously approved these changes
Mar 11, 2025
Contributor
sfc-gh-dpetersohn
left a comment
There was a problem hiding this comment.
Looks good! Left a nit
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
sfc-gh-joshi
approved these changes
Mar 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to this commit, setting storage format and/or engine via OS environment variables would have no effect on Backend, and vice versa.
This commit overrides the
get()method for Backend, StorageFormat, and Engine so that each can derive its value from the config values of its complementary variables.flake8 modin/ asv_bench/benchmarks scripts/doc_checker.pyblack --check modin/ asv_bench/benchmarks scripts/doc_checker.pygit commit -sdocs/development/architecture.rstis up-to-date