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

SystemModel: update_overall_statistics() cache invalidation and refactoring #491

Merged
merged 2 commits into from
Nov 5, 2022

Conversation

lyuyangh
Copy link
Member

@lyuyangh lyuyangh commented Nov 5, 2022

part of #433

  • removes stale analysis_cases from storage if update_overall_statistics() is called multiple times. This method can actually be called multiple times now. (fixes remaining issues from implement update_overall_statistics() and refactor create_system #483 )
  • update_overall_statistics._process() relies on metadata. This does not work because metadata is only available when the system is submitted (metadata is not available when we call update_overall_statistics() to update the cache). This PR is a first attempt to remove the dependency on metadata. To remove the dependency completely, some additional fields need to be stored in the DB. I will follow up with another PR to handle those fields.
  • get_private_properties() now raises a ValueError if the system doesn't exist instead of aborting. If the system doesn't exist when this method is called, it indicates a misuse of the method so an Exception is more appropriate.

Compatibility

  • No DB migration required.
  • Does not change the public interface so explainaboard_client shouldn't be affected.

@lyuyangh lyuyangh requested a review from neubig as a code owner November 5, 2022 17:06
@lyuyangh lyuyangh merged commit 09125e7 into main Nov 5, 2022
@lyuyangh lyuyangh deleted the caching-9 branch November 5, 2022 21:32
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