Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tensorflow/datasets
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d5a7e8d967c311d6a89a054f96c8aa6ac1d551f0
Choose a base ref
...
head repository: tensorflow/datasets
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e7ff4d1e09e8420cc8ea17d76a7d9f08686d6460
Choose a head ref
  • 1 commit
  • 7 files changed
  • 1 contributor

Commits on Oct 2, 2020

  1. Update tfds.load to load datasets from files without using original…

    … class.
    
    **Before:** In `tfds.load('my_dataset')`, the `DatasetBuilder` was always created from the original dataset class (`MyDataset`).
    
    **After:** If the version is specified, `tfds.load`/`tfds.builder` first check whether an existing version is found on disk. If found, only the files are used to restore the dataset (without ever instantiating the original generation class `MyDataset`).
    
    * `tfds.load('my_dataset:2.*.*')` can load `.../my_dataset/2.0.3/` files even if `MyDataset.VERSION == '3.0.0'`. This improve backward-compatibility.
    
    * Dataset can be read even if the generation code isn't reachable anymore. In this case, `tfds.load('my_dataset')` will load the most recent version found on disk. So you can load a dataset generated by someone else without having to import the original dataset code. (caveat: in this case, the config name must be explicit, as TFDS can't currently infer the default config name).
    
    PiperOrigin-RevId: 331954495
    Conchylicultor authored and tfds-copybara committed Oct 2, 2020
    Configuration menu
    Copy the full SHA
    e7ff4d1 View commit details
    Browse the repository at this point in the history
Loading