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

Make '--platform' argument mandatory in qualification and profiling CLI to prevent incorrect behavior #1463

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

parthosa
Copy link
Collaborator

Fixes #1462.

This PR makes the --platform argument mandatory to address issues with incorrect platform detection. Our current platform detection logic may inaccurately identify the platform, leading to incorrect behavior and speed up estimations. For more details, refer to the issue description.

Note:

  • Platform will be mandatory only for qualification and profiling CLI cmds.
  • Other CLI cmds like generate_instance_descriptions or prediction that require a platform are not affected.

Changes

Enforcing Platform Argument Requirement:

Test Case Updates:

@parthosa parthosa added bug Something isn't working user_tools Scope the wrapper module running CSP, QualX, and reports (python) labels Dec 13, 2024
@parthosa parthosa self-assigned this Dec 13, 2024
@parthosa parthosa marked this pull request as ready for review December 13, 2024 19:39
Copy link
Collaborator

@cindyyuanjiang cindyyuanjiang left a comment

Choose a reason for hiding this comment

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

Thanks @parthosa! I saw a lot of test cases are converted from should pass to should fail because platform is missing. Shall we add back some should pass test cases with platform provided?

# for qualification, cost savings should be enabled because cluster is provided
self.validate_tool_args(tool_name=tool_name, tool_args=tool_args,
cost_savings_enabled=True,
expected_platform=csp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add back this should pass test case when platform is available?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting observation @cindyyuanjiang !
I am fine with whichever you folks agree on.

Copy link
Collaborator Author

@parthosa parthosa Dec 16, 2024

Choose a reason for hiding this comment

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

I think all of these tests already include a should_pass case with the platform defined in the previous block.

These updated tests were expected to pass when the platform is not defined. Now, these tests are expected to fail when the platform is not defined.

Hence, I dont think we need to add more tests for should_pass. Let me know your thoughts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@parthosa thanks, I revisited the files and confirmed the other test cases.

Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

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

Thanks @parthosa for making that change.

# for qualification, cost savings should be enabled because cluster is provided
self.validate_tool_args(tool_name=tool_name, tool_args=tool_args,
cost_savings_enabled=True,
expected_platform=csp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting observation @cindyyuanjiang !
I am fine with whichever you folks agree on.

Copy link
Collaborator

@cindyyuanjiang cindyyuanjiang left a comment

Choose a reason for hiding this comment

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

Thanks @parthosa!

Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

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

LGTME!

@parthosa parthosa merged commit 4143ccc into NVIDIA:dev Dec 17, 2024
16 checks passed
@parthosa parthosa deleted the spark-rapids-tools-1462 branch December 17, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user_tools Scope the wrapper module running CSP, QualX, and reports (python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Make '--platform' argument mandatory in CLI to prevent incorrect behavior
3 participants