-
Notifications
You must be signed in to change notification settings - Fork 68
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
1.) Provenance logging refactor and support for SpotFindingResults #1517
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1517 +/- ##
==========================================
- Coverage 87.54% 87.47% -0.08%
==========================================
Files 145 145
Lines 5036 5053 +17
==========================================
+ Hits 4409 4420 +11
- Misses 627 633 +6
Continue to review full report at Codecov.
|
87cd345
to
a9f9535
Compare
69e0b02
to
5eae3cc
Compare
18c85b6
to
29d66f5
Compare
ad12586
to
a484e73
Compare
starfish/core/util/logging.py
Outdated
class Log: | ||
def __init__(self): | ||
""" | ||
Small class for capturing methods applied to throughout a pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small class for capturing methods applied to throughout a pipeline. | |
Class for capturing methods and their parameters applied by an analysis pipeline. |
from starfish.core.types import CORE_DEPENDENCIES, LOG | ||
|
||
|
||
class Log: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the idea. Is this only used by spot finding? My intuition is that this should trigger a bigger refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah this is used by everything. This PR was basically the "bigger" logging refactor needed to keep everything working throughout the refactor
spot_results = kwargs['spots'] | ||
spot_results.log.update_log(args[0]) | ||
result.attrs[STARFISH_EXTRAS_KEY] = spot_results.log.encode() | ||
# OLD CODE FOR DETECT WILL GET REMOVED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# OLD CODE FOR DETECT WILL GET REMOVED | |
# TODO shanaxel42 OLD CODE FOR DETECT WILL GET REMOVED |
29d66f5
to
9bf4e8e
Compare
a484e73
to
4b53ae7
Compare
9bf4e8e
to
b5a67db
Compare
ed717ad
to
8cb311e
Compare
b5a67db
to
699ec22
Compare
8cb311e
to
d7c7372
Compare
189483f
to
94befac
Compare
d7c7372
to
4c3fc56
Compare
94befac
to
af7cd8a
Compare
4c3fc56
to
82b52da
Compare
af7cd8a
to
c27f333
Compare
ed7b64d
to
4e1c009
Compare
71e65d9
to
5ae5c14
Compare
4e1c009
to
08386dc
Compare
29bcddc
to
99b64d8
Compare
3664502
to
e9a2178
Compare
99b64d8
to
4db2a9b
Compare
e9a2178
to
9147e3a
Compare
aadd9a8
to
b214df1
Compare
1d04269
to
5589427
Compare
4ce1efd
to
debb55b
Compare
cbcdcb6
to
dae77b7
Compare
4b3fa52
to
f090a90
Compare
dae77b7
to
403b0bd
Compare
f090a90
to
bf35640
Compare
bf35640
to
c220e44
Compare
it.attrs[STARFISH_EXTRAS_KEY] = LogEncoder().encode({LOG: stack.log}) | ||
if result is not None: | ||
method_class_str = str(args[0].__class__) | ||
if 'ApplyTransform' in method_class_str or 'Filter' in method_class_str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's plausible that we have mechanisms that take multiple loggable objects.
It might be a good idea to have a base ProvenanceTracked
class that all objects (ImageStack
, IntensityTable
, etc.) inherit, and then to walk through all the arguments to find objects that extend ProvenanceTracked
. Then scrape the logs from those objects and build up a provenance graph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a larger refactor, like maybe something post spot finding stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can you tack that onto the logging epic?
There are a lot of gaps in the logging -- for instance, ApplyTransform plausibly should log the origin of the warping data. Also can be covered afterwards.
c220e44
to
8338ae1
Compare
it.attrs[STARFISH_EXTRAS_KEY] = LogEncoder().encode({LOG: stack.log}) | ||
if result is not None: | ||
method_class_str = str(args[0].__class__) | ||
if 'ApplyTransform' in method_class_str or 'Filter' in method_class_str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can you tack that onto the logging epic?
There are a lot of gaps in the logging -- for instance, ApplyTransform plausibly should log the origin of the warping data. Also can be covered afterwards.
This PR does a bit of a provenance log refactor fixing some issues and also setting things up to work with the new FindSpots and DecodeSpots modules.
Depends on #1515 #1489 #1516