huggingface / huggingface/computer-vision-course
Unit 3: bug fixes for transfer-learning-image-classification.ipynb
- Dominant language
- Jupyter Notebook
- Stars
- 881
- Forks
- 242
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
# Bug Description
Ran the notebook on Google Colab and noticed a few bugs. I managed to fix them, so if this issue is approved, I'd like to work on it. It would is also my first contribution to open-source :)
1. Loading the `pcuenq/oxford-pets` dataset
- `NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.` is thrown
- fixed by adding `!pip install -U datasets` beforehand
2. Functions processing images for display
- `show_samples` and `show_predictions`, try to convert `samples[i]['image']['bytes']` into a PIL Image File. However, `samples[i]['image']` is already a `PIL.JpegImagePlugin.JpegImageFile`. `TypeError: 'JpegImageFile' object is not subscriptable` is thrown.
- Fixed by removing code that converts bytes to PIL image
3. `TrainingArguments` has a deprecated `evaluation_strategy` argument
- Should be `eval_strategy`. Fixed by renaming.
# Existing Issues
Found a similar existing issue #375, but I believe it is saying the opposite of what I am observing. The internal image attribute is not a bytes object and is already a PIL image.
# Reproduction
Run the existing notebook on Colab.
# Logs/Screenshots
## Loading the `pcuenq/oxford-pets` dataset
## Functions processing images for display
## `TrainingArguments` has a deprecated `evaluation_strategy` argument
Contributor guide
Assessment
This issue has not been assessed yet.