dkist-processing-ops 1.6.14__tar.gz → 1.6.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dkist-processing-ops might be problematic. Click here for more details.
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/PKG-INFO +1 -1
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/_version.py +2 -2
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tasks/read_memory_leak.py +21 -3
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/PKG-INFO +1 -1
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/.gitignore +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/.pre-commit-config.yaml +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/LICENSE.rst +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/MANIFEST.in +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/README.rst +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/__init__.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/dags/scale.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tasks/__init__.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tasks/wait.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tests/__init__.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tests/test_workflows.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/workflows/__init__.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/workflows/memory_leak.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/workflows/smoke.py +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/SOURCES.txt +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/dependency_links.txt +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/not-zip-safe +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/requires.txt +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops.egg-info/top_level.txt +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/pyproject.toml +0 -0
- {dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/setup.cfg +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import gc
|
|
2
|
+
import logging
|
|
3
|
+
import tracemalloc
|
|
2
4
|
from abc import ABC
|
|
3
5
|
from pathlib import Path
|
|
4
6
|
|
|
@@ -31,26 +33,42 @@ class FitsDataRead(WorkflowTaskBase, ABC):
|
|
|
31
33
|
return self.metadata_store_recipe_run_configuration().get("run_type", "file_read")
|
|
32
34
|
|
|
33
35
|
def run(self) -> None:
|
|
36
|
+
tracemalloc.start()
|
|
34
37
|
if self.run_type == "garbage_collect_read":
|
|
35
38
|
hdus = self.read(
|
|
36
39
|
tags=[Tag.input(), Tag.frame()], decoder=fits_garbage_collect_hdu_decoder
|
|
37
40
|
)
|
|
38
|
-
for hdu in hdus:
|
|
41
|
+
for i, hdu in enumerate(hdus):
|
|
39
42
|
h = hdu.header
|
|
40
43
|
d = hdu.data
|
|
44
|
+
if i % 50 == 0:
|
|
45
|
+
cur, peak = tracemalloc.get_traced_memory()
|
|
46
|
+
logging.info(
|
|
47
|
+
f"After {i} files current memory usage is {cur / 10 ** 6}MB; Peak was {peak / 10 ** 6}MB"
|
|
48
|
+
)
|
|
41
49
|
|
|
42
50
|
if self.run_type == "garbage_collect_task":
|
|
43
51
|
filepaths = self.read(tags=[Tag.input(), Tag.frame()], decoder=path_decoder)
|
|
44
|
-
for filepath in filepaths:
|
|
52
|
+
for i, filepath in enumerate(filepaths):
|
|
45
53
|
hdu = fits_garbage_collect_hdu_decoder(filepath)
|
|
46
54
|
h = hdu.header
|
|
47
55
|
d = hdu.data
|
|
56
|
+
if i % 50 == 0:
|
|
57
|
+
cur, peak = tracemalloc.get_traced_memory()
|
|
58
|
+
logging.info(
|
|
59
|
+
f"After {i} files current memory usage is {cur / 10 ** 6}MB; Peak was {peak / 10 ** 6}MB"
|
|
60
|
+
)
|
|
48
61
|
|
|
49
62
|
if self.run_type == "file_read":
|
|
50
63
|
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=fits_hdu_decoder)
|
|
51
|
-
for hdu in hdus:
|
|
64
|
+
for i, hdu in enumerate(hdus):
|
|
52
65
|
h = hdu.header
|
|
53
66
|
d = hdu.data
|
|
67
|
+
if i % 50 == 0:
|
|
68
|
+
cur, peak = tracemalloc.get_traced_memory()
|
|
69
|
+
logging.info(
|
|
70
|
+
f"After {i} files current memory usage is {cur / 10 ** 6}MB; Peak was {peak / 10 ** 6}MB"
|
|
71
|
+
)
|
|
54
72
|
#
|
|
55
73
|
# if self.run_type == "generated_read":
|
|
56
74
|
# hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=generated_hdu_decoder)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/__init__.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/dags/scale.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tasks/__init__.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tasks/wait.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/tests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_ops-1.6.14 → dkist_processing_ops-1.6.15}/dkist_processing_ops/workflows/smoke.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|