Test custom job results#512
Conversation
|
@copilot review |
| # Machine learning models. | ||
| return result_dict | ||
| bands = asset_metadata.get("bands") | ||
| bands = asset_metadata.get("bands") or asset_metadata.get("eo:bands") |
There was a problem hiding this comment.
@soxofaan An issue for CWL here was that the results can be stac1.0, while the code assumed the was 1.1.
Would wrapping this or with TREAT_JOB_RESULTS_V100_LIKE_V110 make more sense?
There was a problem hiding this comment.
For example with
bands = asset_metadata.get("bands")
TREAT_JOB_RESULTS_V100_LIKE_V110 = smart_bool(os.environ.get("TREAT_JOB_RESULTS_V100_LIKE_V110", "0"))
if not bands and stac11 and TREAT_JOB_RESULTS_V100_LIKE_V110:
bands = asset_metadata.get("eo:bands")There was a problem hiding this comment.
as far as I understand, TREAT_JOB_RESULTS_V100_LIKE_V110 is a temporary toggle/hack, which I would avoid here
I would just use bands = asset_metadata.get("bands") or asset_metadata.get("eo:bands")
There is a possible problem however that "bands" and "eo:bands" have subtly different sub-structure: e.g. in "bands" you could find "center_wavelength", while in "eo:bands" you would just have "center_wavelength" (without prefix). But I guess the most (only?) important field is just "name", which is the same in both.
There was a problem hiding this comment.
Removed the conditional, and now only keeps name property
bands = [{"name": b["name"]} for b in eo_bands]
…hould only be 14-77kb
0a7bd1d to
b6da14b
Compare
| # Machine learning models. | ||
| return result_dict | ||
| bands = asset_metadata.get("bands") | ||
| bands = asset_metadata.get("bands") or asset_metadata.get("eo:bands") |
There was a problem hiding this comment.
as far as I understand, TREAT_JOB_RESULTS_V100_LIKE_V110 is a temporary toggle/hack, which I would avoid here
I would just use bands = asset_metadata.get("bands") or asset_metadata.get("eo:bands")
There is a possible problem however that "bands" and "eo:bands" have subtly different sub-structure: e.g. in "bands" you could find "center_wavelength", while in "eo:bands" you would just have "center_wavelength" (without prefix). But I guess the most (only?) important field is just "name", which is the same in both.
There was a problem hiding this comment.
what is this document exactly? It doens't have an id or type as far as I see
There was a problem hiding this comment.
It is the batch job metadata that gets stored in the results folder. It is used to create stac content with that is returned to the client.
| "end_datetime": "2023-06-06T00:00:00Z", | ||
| "links": [ | ||
| { | ||
| "href": ".../collection.json", |
There was a problem hiding this comment.
Is it intentional to have leading tripple dots here (and in some other places)?
There was a problem hiding this comment.
Changed this and other examples to .../non/existing/example/path/collection.json
…atalog_11/collection.json -r`
@copilot review