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

Use name of enum instead of casting to string #2423

Closed

Conversation

bernardbeckerman
Copy link
Contributor

Summary: Keys.PAIRWISE_PREFERENCE_QUERY or str(Keys.PAIRWISE_PREFERENCE_QUERY) is commonly used when a string is expected, whereas I'm suspecting the intention is Keys.PAIRWISE_PREFERENCE_QUERY.name. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Differential Revision: D56850035

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

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

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.30%. Comparing base (3f8540e) to head (ea3f21d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2423   +/-   ##
=======================================
  Coverage   95.30%   95.30%           
=======================================
  Files         494      494           
  Lines       47920    47930   +10     
=======================================
+ Hits        45670    45680   +10     
  Misses       2250     2250           

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

bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 6, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.name`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

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

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

…sponding experiments (facebook#2422)

Summary:

In D56634321, observations_from_dataframe fails if there are metric_names Data.df that don't also exist on the experiment. This adjusts tests so that they avoid this issue.

Reviewed By: saitcakmak

Differential Revision: D56850033
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.name`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

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

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

bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 6, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.name`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Differential Revision: D56850035
bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 6, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.value`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Reviewed By: Balandat

Differential Revision: D56850035
bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 6, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.value`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Reviewed By: Balandat

Differential Revision: D56850035
bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 6, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.value`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Reviewed By: Balandat

Differential Revision: D56850035
bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 7, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.value`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Reviewed By: Balandat

Differential Revision: D56850035
bernardbeckerman added a commit to bernardbeckerman/Ax that referenced this pull request May 7, 2024
Summary:

`Keys.PAIRWISE_PREFERENCE_QUERY` or `str(Keys.PAIRWISE_PREFERENCE_QUERY)` is commonly used when a string is expected, whereas I'm suspecting the intention is `Keys.PAIRWISE_PREFERENCE_QUERY.value`. This is causing issues in D56634321 which (for now) fails if any metrics in Data.df are not present on experiment when calling observations_from_dataframe.

Reviewed By: Balandat

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

This pull request has been merged in f718253.

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