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

PIG 17 - Provenance capture #2458

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

PIG 17 - Provenance capture #2458

wants to merge 10 commits into from

Conversation

Bultako
Copy link
Member

@Bultako Bultako commented Oct 15, 2019

This PIG proposes to develop a solution for automatic capturing provenance when using the high-level interface. For the moment only provenance capture and storage and it only covers the high-level interface. The prov information would be logged in a structured way following the IVOA Prov model (which is based on W3C prov model). The logging settings declared in the config file of the high-level interface would activate prov logging and where to log this info. There is no need for external dependencies.

There has been been some prototyping work already, and standard provenance files and graphs may be easily built from the log file content with what is identified as prov info.

Copy link
Contributor

@cdeil cdeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bultako - Thanks!

Is this something you want to implement within the next ~ month, i.e. for v1.0?
Or is the plan what to implement next year?
We're short on time for v1.0, so we need to decide whether to put time into reviewing and discussing this now, or later.

Task list
=========

- General cleaning of Gammapy code-base to replace ``print()`` functions with standard Python ``logging``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this, we already use logging consistently instead of print. The places where we use print is for cases where we explicitly write information to the user screen, e.g. when they print out the information for a catalog source, i.e. someone explicitly calls print(source_catalogs["hgps"]["crab"]). Is it clear that those are cases where we in the library should call print instead of log, or does this need discussion?

@Bultako
Copy link
Member Author

Bultako commented Oct 15, 2019

Is this something you want to implement within the next ~ month, i.e. for v1.0?
Or is the plan what to implement next year?

I agree we are short on time for v1.0
Moreover, what is proposed in the PIG is only half of the whole. The other half is user-friendly prov inspection features. If I had to chose I'd prefer not to ship a v1.0 with only half of the whole.

Nevertheless, there are some open issues related with provenance, and I'd like those discussions to be aware of this PIG.

@cdeil cdeil added this to the 1.1 milestone Oct 15, 2019
@cdeil
Copy link
Contributor

cdeil commented Oct 15, 2019

Discussed in Gammapy CC call just now. Agreed to table this PIG and work for now to allow us to focus on other things for v1.0, and then to discuss and work on this in early 2020.

@mservillat
Copy link

I discussed this with @cboisson, it would be good to keep an eye on this implementation regularly as it is already advanced prototyping work, and it is not too intrusive or conflicting with other gammapy features. Though there is capture and inspection of provenance, I think gammapy is mainly concerned by the capture following a standard (IVOA/W3C). Having the provenance information compatible with a standard, it will be possible for it to be explored/used/disseminated with external tools, or more importantly combined with external provenance information (what happened before or after a gammapy analysis).

Copy link
Contributor

@cdeil cdeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bultako - Some superficial comments inline.

docs/development/pigs/pig-017.rst Outdated Show resolved Hide resolved
docs/development/pigs/pig-017.rst Outdated Show resolved Hide resolved
docs/development/pigs/pig-017.rst Outdated Show resolved Hide resolved
docs/development/pigs/pig-017.rst Outdated Show resolved Hide resolved
docs/development/pigs/pig-017.rst Outdated Show resolved Hide resolved
@Bultako Bultako force-pushed the prov-pig branch 2 times, most recently from 2ad6877 to 79561c4 Compare November 13, 2019 07:10
@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@7c2f027). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2458   +/-   ##
=========================================
  Coverage          ?   92.19%           
=========================================
  Files             ?      142           
  Lines             ?    16159           
  Branches          ?        0           
=========================================
  Hits              ?    14897           
  Misses            ?     1262           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c2f027...5c33137. Read the comment docs.

@QRemy
Copy link
Contributor

QRemy commented May 16, 2024

@bkhelifi, @mservillat, @cboisson
What's the status of provenance capture plan ?
How do we continue this PIG ?

@mservillat
Copy link

This is a work I prepared with Jose Enrique, this also started the logprov project (https://github.com/mservillat/logprov).
However, this is besed on Python inspection and can slow down the data processing... we have to discuss if this is stil the way to go, or if we should do something more similar to ctapipe (https://github.com/cta-observatory/ctapipe/blob/main/src/ctapipe/core/provenance.py).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants