-
Notifications
You must be signed in to change notification settings - Fork 356
Remove MapData #4720
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
base: main
Are you sure you want to change the base?
Remove MapData #4720
Conversation
…p" (facebook#4719) Summary: Pull Request resolved: facebook#4719 D81363344 / Ax facebook#4255 disallowed having map keys other than "step", providing deserialization support, with warnings, when a map key other than "step" is deserialized. This was released in Ax 1.1.2; we are now on Ax 1.2.1. Since there have been warnings for a while about this, it should be save to remove the deserialization support. With this change, if a progression was saved with some other column name, such as "epoch," it will be deserialized as another MapData column, with NaN imputed for "step." When this logic goes away in D89820078, it will be deserialized as Data with no "step" column. Differential Revision: D89888874 Privacy Context Container: L1307644
|
@esantorella has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89814417. |
Summary: Pull Request resolved: facebook#4720 Changes: * Remove `MapData` * Replace MapData with Data everywhere * `isinstance(data, MapData)` becomes `data.has_step_column` everywhere * Documentation and messages to the user are updated accordingly * Update some documentation * Decoded MapData JSON to Data Follow-up diffs: * Remove the remaining functions in map_data.py, and MAP_KEY * Move MapData tests to Data Differential Revision: D89814417
d040159 to
17f7efa
Compare
Summary: Pull Request resolved: facebook#4715 This diff merges MapData into Data by giving Data an attribute `has_step_column`. MapData becomes an empty subclass which will be removed in a subsequent PR (D89814417). Note on how this diff is split up: In this diff, functions that previously required MapData now can consume Data, and type checks stop referencing MapData. However, functions can still return MapData; all references are removed in the next diff. Changes: * Functionality from map_data.py is moved into data.py, and functionality from MapData moves into Data; MapData is an empty subclass. * Data (and MapData) get an attribute `has_step_column`; the important distinction becomes `has_step_column`, not type. * It is now possible for both `Data` and `MapData` to either have a step column or not. Having both `Data` and `MapData` like this is an unpleasant intermediate state that we should move off of immediately (landing this and D89814417 together) * Many `isinstance` checks become `has_step_coumn` checks * Data's new methods `subsample` and `latest` get special cases for when there is no "step" column * Make Data's required columns always be the same and not contain "step" (since it isn't really required). Remove `required_columns` method. Differential Revision: D89820078 Privacy Context Container: L1307644 Reviewed By: lena-kashtelyan
Summary: Pull Request resolved: facebook#4720 Changes: * Remove `MapData` * Replace MapData with Data everywhere * `isinstance(data, MapData)` becomes `data.has_step_column` everywhere * Documentation and messages to the user are updated accordingly * Update some documentation * Decoded MapData JSON to Data Follow-up diffs: * Remove the remaining functions in map_data.py, and MAP_KEY * Move MapData tests to Data Question: * Should we leave MapData in place, but have it error and tell people to use Data when initialized? Or is MapData sufficiently rarely used that a message to Ax developers is enough? My take: it's easy enough to do both Differential Revision: D89814417
17f7efa to
232a19b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4720 +/- ##
==========================================
- Coverage 96.72% 96.72% -0.01%
==========================================
Files 582 582
Lines 60711 60643 -68
==========================================
- Hits 58722 58655 -67
+ Misses 1989 1988 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary:
Changes:
MapDataisinstance(data, MapData)becomesdata.has_step_columneverywhereFollow-up diffs:
Differential Revision: D89814417