home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where user = 60647051 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • deepgabani8 · 3 ✖

issue 1

  • Memory leak - xr.open_dataset() not releasing memory. 3

author_association 1

  • NONE 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1369656073 https://github.com/pydata/xarray/issues/7404#issuecomment-1369656073 https://api.github.com/repos/pydata/xarray/issues/7404 IC_kwDOAMm_X85Ro0sJ deepgabani8 60647051 2023-01-03T11:22:21Z 2023-01-03T11:23:55Z NONE

Thanks @DocOtak for the observation.

This is valid only when iterating over the same file. I am observing the same behavior. Here is a memory usage against the iterations.

When I tried to validate this by iterating over different files, the memory is gradually increasing. Here is a memory usage.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Memory leak - xr.open_dataset() not releasing memory. 1512460818
1367443148 https://github.com/pydata/xarray/issues/7404#issuecomment-1367443148 https://api.github.com/repos/pydata/xarray/issues/7404 IC_kwDOAMm_X85RgYbM deepgabani8 60647051 2022-12-29T16:20:41Z 2022-12-29T16:20:41Z NONE

Thanks @shoyer , but closing the dataset explicitly also doesn't seem to be releasing the memory. ```bash Start: 185.5078125 MiB Before opening file: 186.28515625 MiB After opening file: 307.75390625 MiB Filename: temp.py

Line # Mem usage Increment Occurrences Line Contents

 7    186.1 MiB    186.1 MiB           1   @profile
 8                                         def main():
 9    186.1 MiB      0.0 MiB           1       path = 'ECMWF_ERA-40_subset.nc'
10    186.1 MiB      0.0 MiB           1       gc.collect()
11    186.3 MiB      0.2 MiB           1       print(f"Before opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")
12    307.8 MiB    121.5 MiB           1       ds = xr.open_dataset(path)
13    307.8 MiB      0.0 MiB           1       ds.close()
14    307.8 MiB      0.0 MiB           1       del ds
15    307.8 MiB      0.0 MiB           1       gc.collect()
16    307.8 MiB      0.0 MiB           1       print(f"After opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")

End: 307.75390625 MiB ```

I also tried the context manager but the same memory consumption. ```bash Start: 185.5625 MiB Before opening file: 186.36328125 MiB After opening file: 307.265625 MiB Filename: temp.py

Line # Mem usage Increment Occurrences Line Contents

 7    186.2 MiB    186.2 MiB           1   @profile
 8                                         def main():
 9    186.2 MiB      0.0 MiB           1       path = 'ECMWF_ERA-40_subset.nc'
10    186.2 MiB      0.0 MiB           1       gc.collect()
11    186.4 MiB      0.2 MiB           1       print(f"Before opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")
12    307.3 MiB    120.9 MiB           1       with xr.open_dataset(path) as ds:
13    307.3 MiB      0.0 MiB           1           ds.close()
14    307.3 MiB      0.0 MiB           1           del ds
15    307.3 MiB      0.0 MiB           1       gc.collect()
16    307.3 MiB      0.0 MiB           1       print(f"After opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")

End: 307.265625 MiB ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Memory leak - xr.open_dataset() not releasing memory. 1512460818
1366807012 https://github.com/pydata/xarray/issues/7404#issuecomment-1366807012 https://api.github.com/repos/pydata/xarray/issues/7404 IC_kwDOAMm_X85Rd9Hk deepgabani8 60647051 2022-12-28T17:21:28Z 2022-12-28T17:21:28Z NONE

It still shows similar memory consumption. ```bash Start: 185.6015625 MiB Before opening file: 186.24609375 MiB After opening file: 307.1328125 MiB Filename: temp.py

Line # Mem usage Increment Occurrences Line Contents

 7    186.0 MiB    186.0 MiB           1   @profile
 8                                         def main():
 9    186.0 MiB      0.0 MiB           1       path = 'ECMWF_ERA-40_subset.nc'
10    186.0 MiB      0.0 MiB           1       gc.collect()
11    186.2 MiB      0.2 MiB           1       print(f"Before opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")
12    307.1 MiB    120.9 MiB           1       ds = xr.open_dataset(path)
13    307.1 MiB      0.0 MiB           1       del ds
14    307.1 MiB      0.0 MiB           1       gc.collect()
15    307.1 MiB      0.0 MiB           1       print(f"After opening file: {psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2} MiB")

End: 307.1328125 MiB ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Memory leak - xr.open_dataset() not releasing memory. 1512460818

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 1841.404ms · About: xarray-datasette