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

Changes to rename() #2854

Closed nvoxland-al closed 1 month ago

nvoxland-al commented 1 month ago

🚀 🚀 Pull Request

Impact

Description

Previously, deeplake.rename() and dataset.rename() tried to rename both managed and unmanaged datasets.

This PR removes the "rename" support for non-managed datasets, to avoid confusion on whether it does anything to the underlying storage or not. It's now purely a way to rename the URLs of a managed (hub://) dataset.

It also adds the ability to just give the new name as the argument to rename rather than the whole new URL. So the new preferred syntax is: deeplake.rename("hub://my_org/old_path", "new_path" or dataset.rename("new_path"). In either case the new URL will be hub://my_org/new_path

Things to be aware of

That change does mean that you can't use deeplake.rename() to do a storage-level "move" anymore, but that was never the purpose of this method.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud