osbm commited on
Commit
9a3fd46
·
1 Parent(s): a267f75

Update prostate158.py

Browse files
Files changed (1) hide show
  1. prostate158.py +3 -9
prostate158.py CHANGED
@@ -29,7 +29,6 @@ class Prostate158Dataset(datasets.GeneratorBasedBuilder):
29
  DEFAULT_CONFIG_NAME = "3d"
30
 
31
  def _info(self):
32
- # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
33
  if self.config.name == "2d":
34
  features = datasets.Features(
35
  {
@@ -48,15 +47,9 @@ class Prostate158Dataset(datasets.GeneratorBasedBuilder):
48
  )
49
 
50
  def _split_generators(
51
- self, dl_manager: datasets.DownloadManager
 
52
  ) -> List[datasets.SplitGenerator]:
53
- # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
54
- # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
55
-
56
- # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
57
- # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
58
- # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
59
-
60
  downloaded_files = dl_manager.download_and_extract("data.zip")
61
 
62
  return [
@@ -99,6 +92,7 @@ class Prostate158Dataset(datasets.GeneratorBasedBuilder):
99
  for i in range(images_data["t2"].shape[2]):
100
  print(i)
101
  break
 
102
 
103
  elif self.config.name == "3d":
104
  df = pd.read_csv(downloaded_files / f"{split}.csv")
 
29
  DEFAULT_CONFIG_NAME = "3d"
30
 
31
  def _info(self):
 
32
  if self.config.name == "2d":
33
  features = datasets.Features(
34
  {
 
47
  )
48
 
49
  def _split_generators(
50
+ self,
51
+ dl_manager: datasets.DownloadManager
52
  ) -> List[datasets.SplitGenerator]:
 
 
 
 
 
 
 
53
  downloaded_files = dl_manager.download_and_extract("data.zip")
54
 
55
  return [
 
92
  for i in range(images_data["t2"].shape[2]):
93
  print(i)
94
  break
95
+ break
96
 
97
  elif self.config.name == "3d":
98
  df = pd.read_csv(downloaded_files / f"{split}.csv")