activeloopai / deeplake

Database for AI. Store Vectors, Images, Texts, Videos, etc. Use with LLMs/LangChain. Store, query, version, & visualize any AI data. Stream data in real-time to PyTorch/TensorFlow. https://activeloop.ai
https://activeloop.ai
Mozilla Public License 2.0
7.87k stars 605 forks source link

Handle creating a view of a tensor group #2886

Closed nvoxland-al closed 1 week ago

nvoxland-al commented 1 week ago

🚀 🚀 Pull Request

Impact

Description

This PR avoids an error when creating a view of a dataset group, like this:

ds = deeplake.empty("group_test", overwrite = True)
ds.create_tensor("group/test")
ds["group/test"].extend([np.random.rand(100,) for i in range(10000)])

ds.commit()

view = ds["group"][0:10]

view.save_view(id="firstdbf9474_positive_labels", optimize=True, num_workers=0)
sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!