Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Strategy class to ensure consistent tensor operations for data no…
…rmalization (#403) Summary: This PR addresses the second part of issue #365, focusing on the `Strategy` class and how data is added and normalized, transitioning the process to use tensors instead of NumPy operations. The changes were made specifically within the `normalize_inputs` method of the `Strategy` class. Previously, this method had mismatched docstrings indicating `np.array` usage. Now, it consistently accepts and returns tensors, performing all operations within tensors. The `normalize_inputs` method is called in `add_data()` (where the confusion arises), as the data passed can vary (either tensors or `np.array`). To resolve this, the method now acts as the first step, accepting both formats and then converting everything to tensors for consistent operations (model fitting later on). It’s also crucial to ensure the data type is `float64`, as `gpytorch` does not support other data types. Additionally, a detailed docstring was added to clarify the method's expectations and ensure its proper use going forward. Pull Request resolved: #403 Reviewed By: crasanders Differential Revision: D64343236 Pulled By: JasonKChow fbshipit-source-id: 413077605f4fa46b82405897c713cbc62b58a3f3
- Loading branch information