You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
On demand feature views (ODFVs) should use support python dicts #2261
In some test benchmarks, using regular python dicts for inputs for executing the transformations is much faster (up to ~10x) than pandas for the online flow. This tends to be the more latency sensitive flow (offline flows seem to be ~40% slower if using vectorized operations).
In your example what types would the driver_hourly_stats['conv_rate'] be? Would it be a list? If so this interface will require some additional transformation. Would it be better to pass Numpy Arrays? If so have you factored the instantiation of these into the ~10x speed up?
It might make sense to support both, but really there's also the factor of what the user will have access to at serving time. Seems more likely to be a standard dict. numpy should def be faster, but I also worry since it's significantly more verbose.
Could also see a world where we allow both pandas or dicts since pandas will be easier to write the transformations but less performant.
In this specific situation, those conv_rate values with be individual doubles.
changed the title [-]On demand feature views (ODFVs) should use python dicts instead of dataframes[/-][+]On demand feature views (ODFVs) should use support python dicts[/+]on May 17, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
judahrand commentedon Feb 1, 2022
In your example what types would the
driver_hourly_stats['conv_rate']be? Would it be alist? If so this interface will require some additional transformation. Would it be better to pass Numpy Arrays? If so have you factored the instantiation of these into the ~10x speed up?adchia commentedon Feb 14, 2022
Numpy arrays should also be a lot better yeah.
It might make sense to support both, but really there's also the factor of what the user will have access to at serving time. Seems more likely to be a standard dict. numpy should def be faster, but I also worry since it's significantly more verbose.
Could also see a world where we allow both pandas or dicts since pandas will be easier to write the transformations but less performant.
In this specific situation, those
conv_ratevalues with be individual doubles.judahrand commentedon Feb 14, 2022
I was actually thinking a dict of 1d Numpy arrays?
[-]On demand feature views (ODFVs) should use python dicts instead of dataframes[/-][+]On demand feature views (ODFVs) should use support python dicts[/+]stale commentedon Sep 20, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
franciscojavierarceo commentedon Sep 23, 2023
tagging @maksstach who has implemented a version of this on our fork
franciscojavierarceo commentedon Mar 30, 2024
I did this one #4045 next I'll do writes.
franciscojavierarceo commentedon Nov 21, 2024
I added writes here: #4376