Repository: activeloopai/deeplake
Pull request: fix: hash_id catch wrong type.
## 🚀 🚀 Pull Request

### Checklist:

- [x]  [My code follows the style guidelines of this project](https://www.notion.so/activeloop/Engineering-Guidelines-d6e502306d0e4133a8ca507516d1baab) and the [Contributing document](https://github.com/activeloopai/Hub/blob/release/2.0/CONTRIBUTING.md)
- [x]  I have commented my code, particularly in hard-to-understand areas
- [x]  I have kept the `coverage-rate` up
- [x]  I have performed a self-review of my own code and resolved any problems
- [x]  I have checked to ensure there aren't any other open [Pull Requests](https://github.com/activeloopai/Hub/pulls) for the same change
- [x]  I have described and made corresponding changes to the relevant documentation
- [x]  New and existing unit tests pass locally with my changes


### Changes

`.save_view()`

fixes #2248 

Problem statement:
[BUG] type of hash_id is never checked
## 🐛🐛 Bug Report


### ⚗️ Current Behavior
A clear and concise description of the behavior.

**Input Code**
```python
import deeplake
# load dataset
ds = deeplake.load("hub://activeloop/mnist-train")
# filter dataset
zeros = ds.filter("labels == 0")
# save view
zeros.save_view(id=10)
# fails only here: load_view
zeros = ds.load_view(id=10)
```

```python
def _get_view_info()
```

**Expected behavior/code**
type check during save.


### ⚙️ Environment

- `deeplake==3.2.17`

### 🧰 Possible Solution  (optional)
PR

Hints from issue discussion:

Commit message: chore: fix black formatting.

Patch to review:
diff --git a/deeplake/core/dataset/dataset.py b/deeplake/core/dataset/dataset.py
index b9bf3c2c10..ab8d55984c 100644
--- a/deeplake/core/dataset/dataset.py
+++ b/deeplake/core/dataset/dataset.py
@@ -2877,6 +2877,8 @@ def save_view(
             Specifying ``path`` makes the view external. External views cannot be accessed using the parent dataset's :func:`Dataset.get_view`,
             :func:`Dataset.load_view`, :func:`Dataset.delete_view` methods. They have to be loaded using :func:`deeplake.load`.
         """
+        if id is not None and not isinstance(id, str):
+            raise TypeError(f"id {id} is of type {type(id)} must be of type string.")
         return self._save_view(
             path,
             id,


Code review comments:
diff_hunk: @@ -2877,6 +2877,8 @@ def save_view(
             Specifying ``path`` makes the view external. External views cannot be accessed using the parent dataset's :func:`Dataset.get_view`,
             :func:`Dataset.load_view`, :func:`Dataset.delete_view` methods. They have to be loaded using :func:`deeplake.load`.
         """
+        if id is not None and not isinstance(id, str):
+            raise TypeError(f"id {id} is of type {type(id)} must be of type string.")
path: deeplake/core/dataset/dataset.py
text: @user1:
```suggestion
            raise TypeError(f"id {id} is of type {type(id)}, expected `str`.")
```