GSTT-CSC / GSTT-CSC/MLOps-tutorial

Utils/visualise can create an IndexError

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Description

There is a potential issue in `utils/visualise` at line 43 where `test_slice` is defined:

```python
test_slice = random.randint(0, val_data["image"].shape[4])
```

This will create an `IndexError` if `test_slice == val_data["image"].shape[4]`.

The fix is to adjust `randint`:

```python
test_slice = random.randint(0, val_data["image"].shape[4]-1)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.