issues
search
fidelity
/
mabwiser
[IJAIT 2021] MABWiser: Contextual Multi-Armed Bandits Library
https://fidelity.github.io/mabwiser/
Apache License 2.0
213
stars
42
forks
source link
Vectorized Predict function for Linear Policies
#66
Closed
nagireddyakshay
closed
1 year ago
nagireddyakshay
commented
1 year ago
Changes/Optimizations
Vectorized the _predict_contexts() function across all Linear Policies and added a new fn
_vectorized_predict_context()
Outcomes
The revised code is 6x faster than the original implementation
Reproducibility
Old fn creates a new random object for each context provided for reproducibility as the fn runs in parallel
New fn don't require any of the above and utilizes only one random object for all the contexts based of a seed value
Outcome
- Reproducability retained
Changes to the codebase
The values in the assert fn across LinTS, LinGreedy and Parallel tests were modified to accommodate changes from the new fn
Cause
-The use of single seed value across all the contexts produces a different reproducible result
Changes/Optimizations
Outcomes
Reproducibility
Changes to the codebase