Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update similarity_model.py Update verbose printing to display the count of indexed items. Verbose output was missing an f-string prefix and also returned the entire shape. Now we just return the number of examples. * 0.17 patches (#325) * fixes #323 Default indexer distance is now cosine in Sim Model. Calling create_index method now defaults to cosine distance. Additionally, auto distance defaults to cosine if no distance is passed to compile. * fixes #322 remove all calls to tf.convert_to_tensor in SimModel. * Update gitignore to exclude models and datasets from the example notebooks. * Update multi-modal notebook to remove the call to compile. * Patch bump * Remove check for tf.shape in index. Input can also be tuple or dict, so we should use len() here. * Update github workflow tests to use TF >= 2.8 * Tensor slice sampler (#329) * Create tfdata_sampler.py Initial version of new tf.data.Dataset sampler. * Refactor and clean up the tf data sampler. * Add initial tests for tfdata_sampler * Reformat TFDataSampler test file. * Fix proto dep issue in github workflow tests. py 3.10 breaks with protobuf > 3.20.x * Setting env var didn't work. Trying again with pinning the protobuf version to 3.20.1 * Check TF version before creating the tf dataset counter. * Format file * Remove as_numpy_iterator when creating the list of grouped datasets. * Also move class_list filter to before the group_by function * Apply the total_examples_per_class as a take() function on each grouped dataset * Remove as much casting as possible from the dataset. Certain functions expect an int64 though and require casting. * Refactor to move the filter by class list out of the window_group_by function. * Add class list filter test. * Move augment_fn and load_fn to before the repeat and batch functions. This change means the aug and load functions apply per example now. This will make it easier to apply random augmentations per example and is more consistent with how we implemented it in the existing memory sampler. This change also improves the tests for all parts of the module. * Add support for handling tuple and dict values for y. This change adds support for passing a callable to parse the correct class id element for batch sampling. By default y is assumed to be a 1D tensor with the class ids and the function is lambda y:y. Otherwise we accept an int or str and construct a parser to get the class id tensor. * Update email for github actions bot to fix CLA errors in PR * Fix import order and remove typing imports * Fix import check in search init. * Small updates to tfdata_sampler doc string
- Loading branch information