jesse-radiata commited on
Commit
3ada9ba
·
verified ·
1 Parent(s): 6c3d672

Add files using upload-large-folder tool

Browse files
Files changed (1) hide show
  1. brain-structure.py +4 -7
brain-structure.py CHANGED
@@ -96,14 +96,11 @@ class BrainStructure(datasets.GeneratorBasedBuilder):
96
  def _split_generators(self, dl_manager: datasets.DownloadManager):
97
  """
98
  Creates SplitGenerators for 'train', 'validation', and 'test'.
99
- *No actual download* is done here, so data_dir is simply '.'.
100
-
101
- Why '.'? Because whether the dataset is used locally or from the Hub,
102
- Hugging Face will place (or reference) files in this same folder context.
103
  """
104
- data_dir = "." # The local folder containing subdirectories like IXI/, DLBS/, etc.
105
- print(os.path.abspath(data_dir))
106
- logger.info(f"BrainStructure: scanning data in {os.path.abspath(data_dir)}")
107
 
108
  return [
109
  datasets.SplitGenerator(
 
96
  def _split_generators(self, dl_manager: datasets.DownloadManager):
97
  """
98
  Creates SplitGenerators for 'train', 'validation', and 'test'.
99
+ We locate the dataset files by referencing the directory of this script.
 
 
 
100
  """
101
+ data_dir = os.path.abspath(os.path.dirname(__file__))
102
+
103
+ logger.info(f"BrainStructure: scanning data in {data_dir}")
104
 
105
  return [
106
  datasets.SplitGenerator(