activeloopai / activeloopai/deeplake

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

オープン
#1,560 コメント 9 件 リアクション 0 件 担当者 1 名 @Moksh45 が担当を希望しています GitHub で見る
主要言語
C++
スター
9.2k
フォーク
722
PR マージ指標
30日以内にマージされた PR はありません

説明

## 🚨🚨 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
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。