Skip to content

Unit 3: bug fixes for transfer-learning-image-classification.ipynb #402

@tyleryy

Description

@tyleryy

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
  1. 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
  1. 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

Image

Functions processing images for display

Image

TrainingArguments has a deprecated evaluation_strategy argument

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions