activeloopai / activeloopai/deeplake

[Improvement] Make index errors while accessing Dataset and Tensor easier to understand.

Ouverte
#1,560 9 commentaires 0 réactions 1 personne assignée Réclamée par @Moksh45 Voir sur GitHub
Langage dominant
C++
Étoiles
9.2k
Forks
722
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## 🚨🚨 Feature Request

- [x] A new implementation (Improvement, Extension)

### Is your feature request related to a problem?

Currently, if a user tries to access an index that is larger than the dataset length or tensor length, an internal error is thrown which is not easy to understand.

### Description of the possible solution

We can catch the error and throw a more descriptive error that's easier to understand.

Example of when the error is thrown:-

```python
ds = hub.dataset("path/to/dataset")
ds.create_tensor("xyz")
for i in range(10):
ds.xyz.append(i)

# now length of xyz and ds is 10

ds[20] # throws error
ds.xyz[89] # throws error
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.