-
Notifications
You must be signed in to change notification settings - Fork 0
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
Develop a consistent Context mechanism for the the Prefect workflow #28
Comments
A consistent context mechanism was added to all stages of the pipeline. It's currently implemented as a class that can accept dicts to add to the context and will return a dict representation of the current context. A section was added to the wiki briefly describing the design, structure, and potential future improvements. These were not substantially addressed in Sprint 2, but could be addressed in the future:
|
The structure of the context after a full run of pipeline.py as of 8593efc Current context
context = {
"data_import_and_prep": {
"data": {
"J1851+0035": "dask.array",
"source_1": "dask.array",
"data": {
"source_1": "dask.array"
},
"data_source": "archive",
"url": "https://almascience.nrao.edu/aq/",
"J1752-2956": "dask.array",
"source_0": "dask.array",
},
"caltables": {
"gains": "dask.array"
},
"caltable": {
"gains": "dask.array"
},
"qa_scores": {"data_import_and_prep": 0.8502631326462059},
},
"calibrator_data_import_and_prep": {
"qa": {
"calibrator_data_import_and_prep_J1851+0035": 0.9894343336819162,
"calibrator_data_import_and_prep_J1752-2956": 0.8657931974020328,
}
},
"bandpass": {"qa": {"bandpass_qa_score_J1752-2956": 0.7007337845960031}},
"gaincal": {"qa": {"gaincal_qa_score": 0.6783920189417391}},
"calibrator_imaging": {"qa": {"imaging_qa_score": 0.4569692096863739}},
"findcont": {
"data": {
"cube": {
"data": {
"source_1": "dask.array"
},
"data_source": "archive",
"url": "https://almascience.nrao.edu/aq/",
},
"data": {
"source_1": "dask.array"
},
"data_source": "archive",
"url": "https://almascience.nrao.edu/aq/",
},
"datashape": {
"bcal": {"n_field": 1, "n_spw": 3, "n_scan": 1},
"gcal": {"n_field": 1, "n_spw": 3, "n_scan": 4},
"target": {"n_field": 1, "n_spw": 3, "n_scan": 5},
},
},
"image_cube": {
"uvcontsub": {
"uvcont_result": [
["Pass", "Pass", "Pass"],
["Pass", "Pass", "Pass"],
["Pass", "Pass", "Pass"],
["Pass", "Pass", "Pass"],
["Pass", "Pass", "Pass"],
],
"datashape": {
"target": {"n_field": 1, "n_spw": 3, "n_scan": 5, "n_nchan": 2}
},
"qa_result": {"uvcontsub_qa_score": 0.4812112011684333},
},
"image": ["data_0", "data_1", "data_2"],
"data": {
"bcal": {"n_field": 1, "n_spw": 3, "n_scan": 1},
"gcal": {"n_field": 1, "n_spw": 3, "n_scan": 4},
"target": {"n_field": 1, "n_spw": 3, "n_scan": 5, "n_nchan": 2},
},
"cube_image_qa": {
"cubeimage_qa_score": 0.22645717260050102,
"cube_image_data": {
"image": {"x": 512, "y": 512, "nchan": 1, "npol": 1},
"target": {"n_field": 1, "n_spw": 3, "n_scan": 5, "n_nchan": 2},
},
},
},
"context": "context.pkl",
}
In the interest of consistency, let's settle on a structure to use across stages (at least until a more formal spec is developed). Proposal:
Only question I have about how the existing format would map onto this is whether to store |
With the structure we have now, the primary purpose I can see for the |
After some discussion, we settled on:
|
Objective
Develop a consistent Context mechanism for the Prefect workflow to demonstrate the context capability" (The RADPS Product Roadmap objective, Item 01: Workflow Concept Validation , Number 3 )
Requirements
Definition of Done
Key Decision Points
The text was updated successfully, but these errors were encountered: