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

Fix delete db scenario #519

Merged
merged 6 commits into from
Dec 12, 2024
Merged

Fix delete db scenario #519

merged 6 commits into from
Dec 12, 2024

Conversation

maurerle
Copy link
Member

Another attempt to fix the issue in
#512 (comment)

the first two commits are valid anyway, the other two commits are used to reproduce the mentioned issue (unsuccessfully on my side though)

The first two commits do:

  • improve handling of assumeException (when the ovrwrite strategies question in learning is answered with a "n")
  • do not access self.db before initializing the eninge in on_ready

Eventually this helps

@maurerle maurerle requested a review from kim-mskw December 10, 2024 10:55
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.54%. Comparing base (ac41e2c) to head (b184742).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #519      +/-   ##
==========================================
+ Coverage   77.50%   77.54%   +0.03%     
==========================================
  Files          50       50              
  Lines        6793     6790       -3     
==========================================
  Hits         5265     5265              
+ Misses       1528     1525       -3     
Flag Coverage Δ
pytest 77.54% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -107,7 +107,7 @@
data_format = "local_db" # "local_db" or "timescale"

# select the example to run from the available examples above
example = "small"
example = "small_learning_1"
Copy link
Member

Choose a reason for hiding this comment

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

this should not change?

Copy link
Member Author

Choose a reason for hiding this comment

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

the other two commits are used to reproduce the mentioned issue

Yes, I will revert those, once we know whats up with #512

@@ -728,7 +728,7 @@ def load_scenario_folder(
study_case: str,
perform_evaluation: bool = False,
terminate_learning: bool = False,
episode: int = 1,
episode: int = 0,
eval_episode: int = 1,
Copy link
Member

Choose a reason for hiding this comment

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

should eval_episode be 0 as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't look into this change really, just applied it by recommendation in #512 but it did not help me reproduce an issue

nick-harder and others added 2 commits December 12, 2024 10:42
-remove unrequired call for delete_similar_runs in run_learning function
-move episode initilization back into init of output role
-delete_similar_runs on start in output role when episode is 1
-clean up load_scenario_folder function as it doesn't require episode and other info any more
-remove not setting up the world when episode==1 since this error no longer occurs
-save last policies when exiting the loop to avoid confusion with numbering of last episode
-adjust tutorial 04 as well
@nick-harder
Copy link
Member

this also closes #517

@nick-harder nick-harder merged commit 448425c into main Dec 12, 2024
9 checks passed
@nick-harder nick-harder deleted the fix_delete_db_scenario branch December 12, 2024 09: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