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

Avoid VDB Index copy with 'like' API #2687

Merged
merged 11 commits into from Nov 21, 2023
Merged

Avoid VDB Index copy with 'like' API #2687

merged 11 commits into from Nov 21, 2023

Conversation

sounakr
Copy link
Contributor

@sounakr sounakr commented Nov 6, 2023

🚀 🚀 Pull Request

Deeplake Like No samples are copied, only the meta/info for the dataset and it’s tensors. But Like shouldn't copy the vdb index information from the tensor meta to the destination tensor. As currently the vdb index can only be created from vector store Init with the Index Parameters passed through it.

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7b84efb) 84.37% compared to head (e187637) 83.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2687      +/-   ##
==========================================
- Coverage   84.37%   83.82%   -0.55%     
==========================================
  Files         231      231              
  Lines       25902    25904       +2     
==========================================
- Hits        21854    21715     -139     
- Misses       4048     4189     +141     
Flag Coverage Δ
unittests 83.82% <100.00%> (-0.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

deeplake/core/index_maintenance.py Outdated Show resolved Hide resolved
@@ -350,9 +350,10 @@ def extend(
Raises:
TensorDtypeMismatchError: Dtype for array must be equal to or castable to this tensor's dtype.
"""
old_dataset_length = self.num_samples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change really necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in order to keep track of the initial records.

deeplake/core/vectorstore/test_deeplake_vectorstore.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sounakr sounakr merged commit a159b2a into main Nov 21, 2023
12 of 14 checks passed
@sounakr sounakr deleted the tensor_like branch November 21, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants