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

Update notebooks #203

Merged
merged 11 commits into from
Oct 17, 2024
Merged

Update notebooks #203

merged 11 commits into from
Oct 17, 2024

Conversation

jdegerickx
Copy link
Contributor

Some minor updates:

  • update crop type for new public extractions
  • added explanation of what to find in job results

@jdegerickx jdegerickx requested a review from kvantricht October 16, 2024 22:11
@@ -849,6 +850,39 @@ def prepare_visualization(results):
return final_paths


def _results_to_pickle(results, output_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be a private method, and probably be called differently, like save_job_results. Can you also add the required type hinting for arguments and return of the method (-> None)?

I also don't get why you specify an output_dir that then also still needs to be created. Why not the path to the exact file constructed the same way as the job result name? Wouldn't silently make directories here.

pickle.dump(results, f)


def _results_from_pickle(output_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

load_job_results and same comments as above.

WorldCereal InferenceResults
Results object containing the loaded results from an openeo inference run.
"""
with open(output_dir / "results.pkl", "rb") as f:
Copy link
Contributor

Choose a reason for hiding this comment

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

build in resilience if file is not there? Would start from pure file path, not a directory.

@kvantricht kvantricht merged commit 3e40742 into main Oct 17, 2024
4 checks passed
@kvantricht kvantricht deleted the update-notebooks branch October 17, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants