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

Unify interface and data handling of model training and generalization metrics #2367

Closed

Conversation

SebastianAment
Copy link
Contributor

Summary:
This commit unifies the interface of and the loading of the model's training data in _predict_on_cross_validation_data and _predict_on_training_data. Previously, _predict_on_training_data would reload the data from the experiment, which could lead to differences in the number of observations to _predict_on_cross_validation_data if the model was not fit on all existing data.

In addition, this commit introduces a force_refit option for get_fitted_model_bridge which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

Differential Revision: D56105161

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

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

SebastianAment added a commit to SebastianAment/Ax that referenced this pull request Apr 14, 2024
…n metrics (facebook#2367)

Summary:

This commit unifies the interface of and the loading of the model's training data in `_predict_on_cross_validation_data` and `_predict_on_training_data`.  Previously, `_predict_on_training_data` would reload the data from the experiment, which could lead to differences in the number of observations to `_predict_on_cross_validation_data` if the model was not fit on all existing data.

In addition, this commit introduces a `force_refit` option for `get_fitted_model_bridge` which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

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

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

@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 95.29%. Comparing base (adcf3a4) to head (3ce51b0).
Report is 22 commits behind head on main.

❗ Current head 3ce51b0 differs from pull request most recent head 339afac. Consider uploading reports for the commit 339afac to get more accurate results

Files Patch % Lines
ax/modelbridge/cross_validation.py 66.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2367      +/-   ##
==========================================
+ Coverage   94.91%   95.29%   +0.38%     
==========================================
  Files         491      495       +4     
  Lines       47788    48126     +338     
==========================================
+ Hits        45356    45863     +507     
+ Misses       2432     2263     -169     

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

SebastianAment added a commit to SebastianAment/Ax that referenced this pull request Apr 14, 2024
…n metrics (facebook#2367)

Summary:

This commit unifies the interface of and the loading of the model's training data in `_predict_on_cross_validation_data` and `_predict_on_training_data`.  Previously, `_predict_on_training_data` would reload the data from the experiment, which could lead to differences in the number of observations to `_predict_on_cross_validation_data` if the model was not fit on all existing data.

In addition, this commit introduces a `force_refit` option for `get_fitted_model_bridge` which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

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

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

SebastianAment added a commit to SebastianAment/Ax that referenced this pull request Apr 14, 2024
…n metrics (facebook#2367)

Summary:

This commit unifies the interface of and the loading of the model's training data in `_predict_on_cross_validation_data` and `_predict_on_training_data`.  Previously, `_predict_on_training_data` would reload the data from the experiment, which could lead to differences in the number of observations to `_predict_on_cross_validation_data` if the model was not fit on all existing data.

In addition, this commit introduces a `force_refit` option for `get_fitted_model_bridge` which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

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

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

SebastianAment added a commit to SebastianAment/Ax that referenced this pull request Apr 15, 2024
…n metrics (facebook#2367)

Summary:

This commit unifies the interface of and the loading of the model's training data in `_predict_on_cross_validation_data` and `_predict_on_training_data`.  Previously, `_predict_on_training_data` would reload the data from the experiment, which could lead to differences in the number of observations to `_predict_on_cross_validation_data` if the model was not fit on all existing data.

In addition, this commit introduces a `force_refit` option for `get_fitted_model_bridge` which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

Reviewed By: sunnyshen321

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

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

…n metrics (facebook#2367)

Summary:

This commit unifies the interface of and the loading of the model's training data in `_predict_on_cross_validation_data` and `_predict_on_training_data`.  Previously, `_predict_on_training_data` would reload the data from the experiment, which could lead to differences in the number of observations to `_predict_on_cross_validation_data` if the model was not fit on all existing data.

In addition, this commit introduces a `force_refit` option for `get_fitted_model_bridge` which forces a reloading of the data and a refitting of the model to the reloaded data, even if a fitted, potentially out-dated model is on the scheduler.

Reviewed By: sunnyshen321

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f8d5377.

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