Skip to content

Improve validate_applicable_state error messages - Medium Priority Updates (#5127)#5127

Open
shrutipatel31 wants to merge 1 commit intofacebook:mainfrom
shrutipatel31:export-D97528390
Open

Improve validate_applicable_state error messages - Medium Priority Updates (#5127)#5127
shrutipatel31 wants to merge 1 commit intofacebook:mainfrom
shrutipatel31:export-D97528390

Conversation

@shrutipatel31
Copy link
Copy Markdown
Contributor

@shrutipatel31 shrutipatel31 commented Apr 2, 2026

Summary:

Improve validate_applicable_state error messages across ax/analysis
to be more user-friendly and descriptive:

  • Remove self-referential analysis class names from error messages (e.g., "GenerationStrategyGraph requires...", "PredictableMetricsAnalysis requires...", "BaselineImprovementAnalysis requires...") and replace them with action-oriented phrasing (e.g., "A GenerationStrategy must be provided to visualize...").
  • Add parenthetical explanations alongside retained domain class names (OptimizationConfig, OutcomeConstraint, ChoiceParameter) to clarify their meaning for users unfamiliar with Ax internals.
  • Reword the base "Requires an Experiment." message to the more descriptive "An Experiment must be provided to compute this analysis."
  • Remove backtick formatting around class names in error strings.
  • Add purpose/context to error messages (e.g., "...to compute probability of feasibility", "...to evaluate baseline improvement").
  • Replace "Objective" jargon with plain "single-objective optimization" language in OutcomeConstraintsAnalysis.
  • Update test assertions to match the new message wording.

Audited in https://docs.google.com/document/d/1mxkLvXz0SvdWqO9UrVq5hsFY6MlcwDSk7oVRzdU6kN0/edit?tab=t.0 with the help of an AI Agent

Differential Revision: D97528390

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 2, 2026

@shrutipatel31 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97528390.

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 2, 2026
@meta-codesync meta-codesync bot changed the title Improve validate_applicable_state error messages - Medium Priority Updates Improve validate_applicable_state error messages - Medium Priority Updates (#5127) Apr 2, 2026
shrutipatel31 added a commit to shrutipatel31/Ax that referenced this pull request Apr 2, 2026
…dates (facebook#5127)

Summary:

Improve validate_applicable_state error messages across ax/analysis
to be more user-friendly and descriptive:

- Remove self-referential analysis class names from error messages (e.g., "GenerationStrategyGraph requires...", "PredictableMetricsAnalysis requires...", "BaselineImprovementAnalysis requires...") and replace them with action-oriented phrasing (e.g., "A GenerationStrategy must be provided to visualize...").
- Add parenthetical explanations alongside retained domain class names (OptimizationConfig, OutcomeConstraint, ChoiceParameter) to clarify their meaning for users unfamiliar with Ax internals.
- Reword the base "Requires an Experiment." message to the more descriptive "An Experiment must be provided to compute this analysis."
- Remove backtick formatting around class names in error strings.
- Add purpose/context to error messages (e.g., "...to compute probability of feasibility", "...to evaluate baseline improvement").
- Replace "Objective" jargon with plain "single-objective optimization" language in OutcomeConstraintsAnalysis.
- Update test assertions to match the new message wording.

Audited in https://docs.google.com/document/d/1mxkLvXz0SvdWqO9UrVq5hsFY6MlcwDSk7oVRzdU6kN0/edit?tab=t.0 with the help of an AI Agent

Differential Revision: D97528390
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.41%. Comparing base (c8a547d) to head (86f076e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5127      +/-   ##
==========================================
+ Coverage   96.40%   96.41%   +0.01%     
==========================================
  Files         613      613              
  Lines       68187    68219      +32     
==========================================
+ Hits        65737    65775      +38     
+ Misses       2450     2444       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…dates (facebook#5127)

Summary:

Improve validate_applicable_state error messages across ax/analysis
to be more user-friendly and descriptive:

- Remove self-referential analysis class names from error messages (e.g., "GenerationStrategyGraph requires...", "PredictableMetricsAnalysis requires...", "BaselineImprovementAnalysis requires...") and replace them with action-oriented phrasing (e.g., "A GenerationStrategy must be provided to visualize...").
- Add parenthetical explanations alongside retained domain class names (OptimizationConfig, OutcomeConstraint, ChoiceParameter) to clarify their meaning for users unfamiliar with Ax internals.
- Reword the base "Requires an Experiment." message to the more descriptive "An Experiment must be provided to compute this analysis."
- Remove backtick formatting around class names in error strings.
- Add purpose/context to error messages (e.g., "...to compute probability of feasibility", "...to evaluate baseline improvement").
- Replace "Objective" jargon with plain "single-objective optimization" language in OutcomeConstraintsAnalysis.
- Update test assertions to match the new message wording.

Audited in https://docs.google.com/document/d/1mxkLvXz0SvdWqO9UrVq5hsFY6MlcwDSk7oVRzdU6kN0/edit?tab=t.0 with the help of an AI Agent

Differential Revision: D97528390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants