Fix a Not Defined Variable `filepath` in streaming=False mode, and reshape ndim of timestamp from 0 to 1
#5
by
hchen19
- opened
Fix 1:
add an argumentfilepath
to fix the undefined variablefilepath
in_split_generators()
function whenstreaming=False
Fix 2
fix theTypeError: object of type 'numpy.datetime64' has no len()
, reshape the values of"timestamp"
in dictvalue
in_generate_examples()
function to anumpy.array
such thatlen(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" )