issue_comments
6 rows where issue = 482543307 and user = 14808389 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Use pytorch as backend for xarrays · 6 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
851581057 | https://github.com/pydata/xarray/issues/3232#issuecomment-851581057 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDg1MTU4MTA1Nw== | keewis 14808389 | 2021-05-31T16:12:35Z | 2021-06-01T20:01:07Z | MEMBER | changing the We might still be a bit too early with this, though: the PR which adds |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 | |
851426576 | https://github.com/pydata/xarray/issues/3232#issuecomment-851426576 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDg1MTQyNjU3Ng== | keewis 14808389 | 2021-05-31T11:32:05Z | 2021-05-31T11:32:05Z | MEMBER | I don't, unfortunately (there's the partial example in https://github.com/pydata/xarray/issues/3232#issuecomment-769789746, though). This is nothing usable right now, but the You (or anyone interested) might still want to maintain a "pytorch-xarray" convenience library to allow something like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 | |
786599239 | https://github.com/pydata/xarray/issues/3232#issuecomment-786599239 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDc4NjU5OTIzOQ== | keewis 14808389 | 2021-02-26T11:47:55Z | 2021-02-26T11:48:09Z | MEMBER | @Duane321: with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 | |
771066618 | https://github.com/pydata/xarray/issues/3232#issuecomment-771066618 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDc3MTA2NjYxOA== | keewis 14808389 | 2021-02-01T18:34:00Z | 2021-02-01T23:39:51Z | MEMBER | I can't reproduce that:
Edit: the missing feature list includes |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 | |
769789746 | https://github.com/pydata/xarray/issues/3232#issuecomment-769789746 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDc2OTc4OTc0Ng== | keewis 14808389 | 2021-01-29T12:57:37Z | 2021-01-29T15:22:01Z | MEMBER |
For now, I guess we can remove it using Not sure if that's the best way, but that would look like this: <tt>pytorch</tt> wrapper class```python In [13]: import numpy as np ...: import torch ...: from typing import Tuple ...: import xarray as xr ...: import functools ...: ...: def wrap_torch(f): ...: @functools.wraps(f) ...: def wrapper(*args, **kwargs): ...: # TODO: use a dict comprehension if there are functions that rely on the order of the parameters ...: if "axis" in kwargs: ...: kwargs["dim"] = kwargs.pop("axis") # torch calls that parameter 'dim' instead of 'axis' ...: ...: return f(*args, **kwargs) ...: ...: return wrapper ...: ...: class DTypeWrapper: ...: def __init__(self, dtype): ...: self.dtype = dtype ...: if dtype.is_complex: ...: self.kind = "c" ...: elif dtype.is_floating_point: ...: self.kind = "f" ...: else: ...: # I don't know pytorch at all, so falling back to "i" might not be the best choice ...: self.kind = "i" ...: ...: def __getattr__(self, name): ...: return getattr(self.dtype, name) ...: ...: def __repr__(self): ...: return repr(self.dtype) ...: ...: IMPLEMENTED_FUNCTIONS = { ...: np.mean: wrap_torch(torch.mean), ...: np.nanmean: wrap_torch(torch.mean), # not sure if pytorch has a separate nanmean function ...: } ...: ...: class XArrayTensor(torch.Tensor): ...: def __new__(cls, data=None, requires_grad=False): ...: if data is None: ...: data = torch.Tensor() ...: return torch.Tensor._make_subclass(cls, data, requires_grad) ...: ...: def __init__(self, data=None, dims: Tuple[str] = None): ...: self.dims = dims ...: ...: def __array_function__(self, func, types, args, kwargs): ...: if func not in IMPLEMENTED_FUNCTIONS or any(not issubclass(t, torch.Tensor) for t in types): ...: return NotImplemented ...: return IMPLEMENTED_FUNCTIONS[func](*args, **kwargs) ...: ...: def __array_ufunc__(self, func, types, args, kwargs): ...: if func not in IMPLEMENTED_FUNCTIONS or any(not issubclass(t, torch.Tensor) for t in types): ...: return NotImplementedError ...: return IMPLEMENTED_FUNCTIONS[func](*args, **kwargs) ...: ...: def __getattribute__(self, name): ...: if name == "values": ...: raise AttributeError( ...: "'values' has been removed for compatibility with xarray." ...: " To access it, use `torch.Tensor(tensor).values()`." ...: ) ...: return object.__getattribute__(self, name) ...: ...: @property ...: def shape(self): ...: return tuple(super().shape) ...: ...: @property ...: def dtype(self): ...: return DTypeWrapper(super().dtype) ...: ...: tensor = XArrayTensor(torch.rand(3, 2)) ...: display(tensor) ...: display(tensor.shape) ...: display(tensor.dtype) ...: display(tensor.ndim) ...: ...: da = xr.DataArray(tensor, coords={"a": ["a1", "a2", "a3"], "b": ["b1", "b2"]}, dims=["a", "b"]) ...: display(da) ...: display(da.data) ...: display(da.mean(dim="a")) ```with that, I can execute For
no, it won't be because this is fragile: any new method of Instead, we recommend extension packages (extending xarray), so with a hypothetical |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 | |
766470557 | https://github.com/pydata/xarray/issues/3232#issuecomment-766470557 | https://api.github.com/repos/pydata/xarray/issues/3232 | MDEyOklzc3VlQ29tbWVudDc2NjQ3MDU1Nw== | keewis 14808389 | 2021-01-25T00:33:35Z | 2021-01-25T00:33:35Z | MEMBER |
defining |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use pytorch as backend for xarrays 482543307 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 1