albertvillanova HF staff commited on
Commit
4b47da3
1 Parent(s): 58a38ea

Remove deprecated tasks

Browse files

This dataset uses `tasks`, which are deprecated and will raise an error after the next major release of `datasets`. See: https://github.com/huggingface/datasets/pull/6999

Files changed (1) hide show
  1. imagefolder.py +0 -2
imagefolder.py CHANGED
@@ -5,7 +5,6 @@ from typing import Optional
5
  import pyarrow as pa
6
 
7
  import datasets
8
- from datasets.tasks import ImageClassification
9
 
10
 
11
  logger = datasets.utils.logging.get_logger(__name__)
@@ -39,7 +38,6 @@ class ImageFolder(datasets.GeneratorBasedBuilder):
39
  features=datasets.Features(
40
  {"image_file_path": datasets.Value("string"), "labels": datasets.Value("string")}
41
  ),
42
- task_templates=[datasets.tasks.ImageClassification(image_file_path_column="image_file_path", label_column="labels", labels=classes)]
43
  )
44
 
45
  def _split_generators(self, dl_manager):
 
5
  import pyarrow as pa
6
 
7
  import datasets
 
8
 
9
 
10
  logger = datasets.utils.logging.get_logger(__name__)
 
38
  features=datasets.Features(
39
  {"image_file_path": datasets.Value("string"), "labels": datasets.Value("string")}
40
  ),
 
41
  )
42
 
43
  def _split_generators(self, dl_manager):