Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📌 Pin minimum xbatcher version to 0.2.0 #73

Merged
merged 6 commits into from
Nov 5, 2022
Merged

📌 Pin minimum xbatcher version to 0.2.0 #73

merged 6 commits into from
Nov 5, 2022

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented Nov 4, 2022

Using xbatcher v0.2.0 released 27 Oct 2022 which comes with better xarray.DataArray/xarray.Dataset compatibility implemented in xarray-contrib/xbatcher#71. Setting the minimum version to v0.2.0 instead of v0.1.0 allows us to remove a workaround with the xarray.DataArray name not being set (see 147f270). Tutorials also need to be updated, as some code can now be simplified with xarray.DataArray being returned rather than xarray.Dataset.

Bumps xbatcher from 0.1.0 to 0.2.0.

@weiji14 weiji14 added this to the 0.6.0 milestone Nov 4, 2022
@weiji14 weiji14 self-assigned this Nov 4, 2022
Slicing an `xarray.DataArray` with xbatcher=0.2.0 now returns an `xarray.DataArray` instead of an `xarray.Dataset`!
Since `xarray.DataArray` objects are not converted to `xarray.Dataset` objects anymore in xbatcher=0.2.0, the hacky roundtrip workaround added in 147f270 can be removed.
No need to turn those `xarray.Dataset` objects to `xarray.DataArray` anymore using `.data_vars.get(key="__xarray_dataarray_variable__")`! Simplifies all those custom xarray collate functions and the raster plotting code. Also fixed a typo in vector-segmentation-masks.md.
The latest torchdata=0.5.0 version installed via readthedocs has a bug with `torchdata.datapipes.utils.to_graph` raising `AttributeError: 'tuple' object has no attribute 'items'`. This has been fixed in pytorch/data#872, but need to wait for torchdata=0.5.1 or later to be released, so keep using torchdata=0.4.1 for now.
@weiji14 weiji14 marked this pull request as ready for review November 5, 2022 02:31
Convert `xr.Dataset` to `xr.DataArray` in some of the docstrings and type hints of functions in the walkthrough tutorials, since the raster images returned by `xbatcher=0.2.0` are now `xarray.DataArray` objects if `xarray.DataArray` inputs are passed in.
@weiji14 weiji14 merged commit 96e24d9 into main Nov 5, 2022
@weiji14 weiji14 deleted the xbatcher-0.2.0 branch November 5, 2022 03:12
weiji14 added a commit that referenced this pull request Mar 16, 2023
Pin to torchdata==0.4.1 no longer needed, as torchdata 0.6.0 has been released which contains bugfix for the `to_graph` visualization function at pytorch/data#872. Reverts 967d864 in #73.
weiji14 added a commit that referenced this pull request Mar 16, 2023
* 👽 Remove torchdata==0.4.1 pin

Pin to torchdata==0.4.1 no longer needed, as torchdata 0.6.0 has been released which contains bugfix for the `to_graph` visualization function at pytorch/data#872. Reverts 967d864 in #73.

* ⬆️ Bump torchdata from 0.4.0 to 0.6.0

Bumps [torchdata](https://github.com/pytorch/data) from 0.4.0 to 0.6.0.
- [Release notes](https://github.com/pytorch/data/releases)
- [Commits](pytorch/data@v0.4.0...v0.6.0)

* 👽 Import DataLoader2 from torchdata instead of torch

Fix readthedocs build by using `torchdata.dataloader2.DataLoader2` instead of `torch.utils.data.DataLoader2`, refer to https://pytorch.org/data/0.6/dataloader2.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant