Skip to content
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

Cherrypick master #331

Merged
merged 9 commits into from
May 5, 2023
Merged

Cherrypick master #331

merged 9 commits into from
May 5, 2023

Commits on May 5, 2023

  1. 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.
    owenvallis committed May 5, 2023
    Configuration menu
    Copy the full SHA
    374d9c5 View commit details
    Browse the repository at this point in the history
  2. 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
    owenvallis committed May 5, 2023
    Configuration menu
    Copy the full SHA
    e2c84b6 View commit details
    Browse the repository at this point in the history
  3. Remove check for tf.shape in index. Input can also be tuple or dict, …

    …so we should use len() here.
    owenvallis committed May 5, 2023
    Configuration menu
    Copy the full SHA
    e98c707 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0fb78e2 View commit details
    Browse the repository at this point in the history
  5. 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.
    owenvallis committed May 5, 2023
    Configuration menu
    Copy the full SHA
    a9a8e23 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9537511 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f979517 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2522de5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7206f23 View commit details
    Browse the repository at this point in the history