Skip to content
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

SparkDistributedBackend._is_support_stage_scheduling always prints warning #59

Open
philipmat opened this issue Dec 30, 2024 · 0 comments

Comments

@philipmat
Copy link

philipmat commented Dec 30, 2024

The else condition in SparkDistributedBackend._is_support_stage_scheduling seems to always print a "Spark version does not support stage-level scheduling." warning whether the context can be parallelize or not.

    def _is_support_stage_scheduling(self):
        spark_master = self._spark_context.master
        is_spark_local_mode = spark_master == "local" or spark_master.startswith("local[")
        if is_spark_local_mode:
            support_stage_scheduling = False
            warnings.warn("Spark local mode doesn't support stage-level scheduling.")
        else:
            support_stage_scheduling = hasattr(
                self._spark_context.parallelize([1]), "withResources"
            )
            warnings.warn("Spark version does not support stage-level scheduling.")
        return support_stage_scheduling

If seems like maybe it should only print the warning if support_state_scheduling was false?

        else:
            support_stage_scheduling = hasattr(
                self._spark_context.parallelize([1]), "withResources"
            )
            if not support_stage_scheduling:
                 warnings.warn("Spark version does not support stage-level scheduling.")
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

No branches or pull requests

1 participant