-
Notifications
You must be signed in to change notification settings - Fork 4
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
allow multiple outputs for inference results #175
Conversation
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.
Nice evolution! But I added quite a few comments to think about and we can discuss on Monday. File naming consistency is something we have to think about carefully.
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.
good to go!
When saving an intermediate result in openeo, one needs to specify the "filename_prefix" option in the "save_result" function.
This was not done before, so the asset was overwritten by the final result.
I tested this for cropland inference and it works now, successfully generating 2 assets.
Instead of downloading the assets during the "execute_batch" call (which only supports download of a single asset), I have introduced a few lines which download all assets belonging to a certain job, including the metadata json file.
I changed the nature of InferenceResults, to be able to cope with multiple outputs for a single inference run.
To do so, I renamed WorldCerealProduct to WorldCerealProductType (because this was actually a product type) and created a new data class WorldCerealProduct which now holds the URL, local path and product type of an actual product (raster file).
All changes were tested for the cropland inference case.
I was not yet able to test inference for crop type, as the job failed due to another reason...