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

DM-12535: Wrap ap_verify and run it over HITS dataset #14

Merged
merged 1 commit into from Dec 5, 2017

Conversation

kfindeisen
Copy link
Member

This PR adds a wrapper script that calls ap_verify for a specific set of visits and CCDs. The script has the data IDs hard-coded (since I couldn't see another way to extract them pre-ingestion), and has highly special-cased handling of measurement merging. Once DM-12314 is resolved, the script will be unneccessary, as ap_verify/ap_pipe will be able to internally handle multiple dataIds.

@@ -153,11 +153,19 @@ def _measure_final_properties(metadata, output_dir, args, metrics_job):
metrics_job.measurements.insert(measurement)


def run_ap_verify():
def run_ap_verify(cmdLine=None):
Copy link
Contributor

@ebellm ebellm Dec 4, 2017

Choose a reason for hiding this comment

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

is there a standard way to do this in the stack? It seems unconventional...

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, part of the DM-11372 type work then.

Copy link
Contributor

@ebellm ebellm left a comment

Choose a reason for hiding this comment

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

just a couple comments here. the merge code probably needs to live somewhere else eventually (since this is a temporary demo script), but I don't object to having it here for now.

demo_run.py Outdated
@@ -0,0 +1,277 @@
# Run ap_verify on HiTS data
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this a module docstring rather than a comment?

"""Adds the values of some measurements.

Extras and notes will be dictionary-merged (i.e., if multiple extras or
notes are assigned to the same key, only one will be preserved).
Copy link
Contributor

Choose a reason for hiding this comment

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

which one? the last one?

Copy link
Member Author

@kfindeisen kfindeisen Dec 5, 2017

Choose a reason for hiding this comment

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

I'm not comfortable guaranteeing that, especially since, if any extras or notes differ, this behavior is undesirable no matter which one gets chosen.

@kfindeisen
Copy link
Member Author

I'm working on the assumption that a lot of the merging code will not be needed at all in the final implementation (e.g., because metrics are only computed based on the final DB state). If it is needed, then it will certainly need to be more generic (see the discussion surrounding DMTN-057).

This script is a temporary hack around some existing limitations of
ap_verify/ap_pipe. It should only be used for the specific purpose
of testing the November 2017 AP milestones.
@kfindeisen kfindeisen merged commit 534c26e into master Dec 5, 2017
@kfindeisen kfindeisen deleted the tickets/DM-12535 branch November 30, 2018 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants