Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2755
The data loader covers a lot of edge cases and Im sure could be completely redesigned with some benefit, but its not fun. Follows standard format of /_TRAIN.ts and /_TEST.ts
The problem comes when trying to load local data with
when C:\Temp\Foo exists, but does not contain what we are looking for it gets deleted. Note its fine to load a dataset with load_from_ts_file, this is just when using load_classification, because of some assumptions and too many alternatives. The basic logic is to look in a location for the requested dataset in a directory at location <extract_path>. It calls ```get_downloaded_tsc_tsr_datasets`` which returns a list of valid directories. To be valid, you need to have BOTH _train and _test
ts files. If they are not there, its considered incorrect.
The problem here arises when there is a local directory, but it does not contain train and test files. The function then tries to download the zip from tsc.com or zenodo using _download_and_extract. Here there is a case when it will create a directory if not present to put the zip in then attempt to unzip, since for legacy reasons, the zips do not internally contain a directory.
Anyway, long story short, this now only deletes the directory if it was not already present and had thus been created at the attempted download