Skip to content

Improve validate_applicable_state error messages - High Priority Updates (#5126)#5126

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

Improve validate_applicable_state error messages - High Priority Updates (#5126)#5126
shrutipatel31 wants to merge 1 commit intofacebook:mainfrom
shrutipatel31:export-D97528392

Conversation

@shrutipatel31
Copy link
Copy Markdown
Contributor

@shrutipatel31 shrutipatel31 commented Apr 2, 2026

Summary:

Fix actively misleading or broken NotApplicableState error messages across ax/analysis:

  • utils.py: Replace raw Python kwarg f-string syntax ({trial_indices=}, {trial_statuses=}) with readable key=value output in validate_experiment_has_trials messages
  • utils.py: Remove raw Adapter repr ({adapter}) from validate_adapter_can_predict messages; replace with user-readable text
  • best_trials.py: Replace backtick-quoted class names (OptimizationConfig, GenerationStrategy) with plain-language descriptions and actionable steps
  • sensitivity.py: Replace opaque "TorchAdapter is required." with a message explaining what the user needs to do
  • top_surfaces.py: Remove {type(relevant_adapter)} type repr; replace with plain-language message matching sensitivity.py
  • marginal_effects.py: Fix typo "but got.'" (missing space before quote) and remove {type(parameter).__name__} internal class name from error message
  • objective_p_feasible_frontier.py: Fix "Optimization_config" underscore bug (should read "optimization config"), and replace raw Adapter repr ({relevant_adapter}, {relevant_adapter.generator}) with __name__ type strings

Differential Revision: D97528392

@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 D97528392.

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 2, 2026
…tes (facebook#5126)

Summary:

Fix actively misleading or broken NotApplicableState error messages across ax/analysis:

- **utils.py**: Replace raw Python kwarg f-string syntax ({trial_indices=}, {trial_statuses=}) with readable key=value output in `validate_experiment_has_trials` messages
- **utils.py**: Remove raw Adapter repr ({adapter}) from `validate_adapter_can_predict` messages; replace with user-readable text
- **best_trials.py**: Replace backtick-quoted class names (`OptimizationConfig`, `GenerationStrategy`) with plain-language descriptions and actionable steps
- **sensitivity.py**: Replace opaque "`TorchAdapter` is required." with a message explaining what the user needs to do
- **top_surfaces.py**: Remove {type(relevant_adapter)} type repr; replace with plain-language message matching `sensitivity.py`
- **marginal_effects.py**: Fix typo "but got.'" (missing space before quote) and remove {type(parameter).`__name__`} internal class name from error message
- **objective_p_feasible_frontier.py**: Fix "Optimization_config" underscore bug (should read "optimization config"), and replace raw Adapter repr ({relevant_adapter}, {relevant_adapter.generator}) with `__name__` type strings

Differential Revision: D97528392
@meta-codesync meta-codesync bot changed the title Improve validate_applicable_state error messages - High Priority Updates Improve validate_applicable_state error messages - High Priority Updates (#5126) Apr 2, 2026
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.

1 participant