Fix a Not Defined Variable `filepath` in streaming=False mode, and reshape ndim of timestamp from 0 to 1

#5
  • Fix 1:
    add an argument filepath to fix the undefined variable filepath in _split_generators() function when streaming=False

  • Fix 2
    fix the TypeError: object of type 'numpy.datetime64' has no len(), reshape the values of "timestamp" in dict value in _generate_examples() function to a numpy.array such that len(value["timestamp"])=1

  • test code block

     from datasets import load_dataset
     ds = load_dataset(path='openclimatefix/gfs-reforecast',
                  revision='main',
                  streaming=False,
                  filepath="path to a local json file consists of relative paths to data files we want to load w.r.t. the gfs-reforecast folder"
                  )
    
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment