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

AnalysisCard refactor #2589

Closed
wants to merge 2 commits into from
Closed

Conversation

mpolson64
Copy link
Contributor

Summary:
New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into Analysis (code for "how" a plot is to be generated) and AnalysisCard (the generated plot and its raw data).

See N5607609 for demo.

Analysis

  • Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
  • compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
  • Analysis is a Protocol to allow users to easily implement their own analyses structurally

AnalysisCard

  • Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
  • Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 19, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 92.10526% with 9 lines in your changes missing coverage. Please review.

Project coverage is 95.19%. Comparing base (9cde572) to head (1016ef2).

Files Patch % Lines
ax/analysis/analysis.py 75.86% 7 Missing ⚠️
ax/analysis/markdown/markdown_analysis.py 94.11% 1 Missing ⚠️
ax/analysis/plotly/plotly_analysis.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2589      +/-   ##
==========================================
- Coverage   95.21%   95.19%   -0.02%     
==========================================
  Files         489      495       +6     
  Lines       47678    47750      +72     
==========================================
+ Hits        45396    45457      +61     
- Misses       2282     2293      +11     

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

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

mpolson64 added a commit to mpolson64/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2589

New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into **Analysis** (code for "how" a plot is to be generated) and **AnalysisCard** (the generated plot and its raw data).

See N5607609 for demo.

## Analysis
* Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
* compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
* Analysis is a Protocol to allow users to easily implement their own analyses structurally

## AnalysisCard
* Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
* Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

mpolson64 added a commit to mpolson64/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2589

New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into **Analysis** (code for "how" a plot is to be generated) and **AnalysisCard** (the generated plot and its raw data).

See N5607609 for demo.

## Analysis
* Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
* compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
* Analysis is a Protocol to allow users to easily implement their own analyses structurally

## AnalysisCard
* Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
* Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

mpolson64 added a commit to mpolson64/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2589

New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into **Analysis** (code for "how" a plot is to be generated) and **AnalysisCard** (the generated plot and its raw data).

See N5607609 for demo.

## Analysis
* Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
* compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
* Analysis is a Protocol to allow users to easily implement their own analyses structurally

## AnalysisCard
* Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
* Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

mpolson64 added a commit to mpolson64/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2589

New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into **Analysis** (code for "how" a plot is to be generated) and **AnalysisCard** (the generated plot and its raw data).

See N5607609 for demo.

## Analysis
* Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
* compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
* Analysis is a Protocol to allow users to easily implement their own analyses structurally

## AnalysisCard
* Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
* Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999
mpolson64 and others added 2 commits July 24, 2024 07:58
Summary: Refactor incoming

Differential Revision: D59925220
Summary:
Pull Request resolved: facebook#2589

New structure for Analysis to make the Ax classes easier to reason about in light of storage considerations. The central change is to break up the existing Analysis class into **Analysis** (code for "how" a plot is to be generated) and **AnalysisCard** (the generated plot and its raw data).

See N5607609 for demo.

## Analysis
* Init method to take in "settings" (like which parameter or metrics to operate on, or whether to use observed or modeled effects) and store on class
* compute method takes in Experiment or GenerationStrategy (or both) and outputs an AnalysisCard
* Analysis is a Protocol to allow users to easily implement their own analyses structurally

## AnalysisCard
* Contains the raw data computed by the analysis and a "blob" which holds data processed and ready for end-user consumption (ex. a plot)
* Contains other miscellaneous metadata that can be useful for rendering the card or a collection of cards

See the following diff for sample usage.

Differential Revision: D59926999
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59926999

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3a44dad.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants