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

Log summary of simulation statuses #46

Merged
merged 7 commits into from
Jan 2, 2024
Merged

Log summary of simulation statuses #46

merged 7 commits into from
Jan 2, 2024

Conversation

nweires
Copy link
Collaborator

@nweires nweires commented Dec 15, 2023

At the end of post-processing, print a summary of successful/failed/invalid simulations, grouped by upgrade.

Example output:

INFO:2023-12-15 16:30:59:buildstockbatch.cloud.docker_base:Final status of all simulations:
Baseline     Success: 8        Fail: 0        Invalid: 0        
Upgrade 01   Success: 8        Fail: 0        Invalid: 0        
Upgrade 02   Success: 8        Fail: 0        Invalid: 0        
Upgrade 03   Success: 8        Fail: 0        Invalid: 0        
Upgrade 04   Success: 2        Fail: 0        Invalid: 6        
Upgrade 05   Success: 8        Fail: 0        Invalid: 0        
Upgrade 06   Success: 0        Fail: 0        Invalid: 8        
Upgrade 07   Success: 8        Fail: 0        Invalid: 0        
Upgrade 08   Success: 8        Fail: 0        Invalid: 0        
Upgrade 09   Success: 8        Fail: 0        Invalid: 0        
Upgrade 10   Success: 8        Fail: 0        Invalid: 0        
Upgrade 11   Success: 8        Fail: 0        Invalid: 0        
Upgrade 12   Success: 8        Fail: 0        Invalid: 0        

Total        Success: 90       Fail: 0        Invalid: 14       

No results found for Upgrade 13
No results found for Upgrade 14

Future work:

  • If useful, we could also show a few IDs of specific buildings that failed (to find them more quickly for debugging)
  • Look for specific error messages in the logs and find a way to summarize those.

Copy link

github-actions bot commented Dec 15, 2023

File Coverage
All files 86%
base.py 91%
exc.py 57%
hpc.py 78%
local.py 70%
postprocessing.py 84%
utils.py 91%
cloud/docker_base.py 78%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/shared_testing_stuff.py 85%
test/test_docker.py 33%
test/test_local.py 97%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 86%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against da029d7

Copy link

@mfathollahzadeh mfathollahzadeh left a comment

Choose a reason for hiding this comment

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

Thanks Natalie! This looks great and would be really helpful! I just added some thought to get your feedback on those and see if implementing those would add something to our guardrails. Thanks!

Copy link

@mfathollahzadeh mfathollahzadeh left a comment

Choose a reason for hiding this comment

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

Thanks, Natalie!

for upgrade in postprocessing.get_upgrade_list(self.cfg):
if f"{upgrade:02d}" not in status_summary:
s += f"\nNo results found for Upgrade {upgrade}"
logger.info(s)
Copy link
Member

Choose a reason for hiding this comment

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

What do you think of also including:

  • The sum for each status (e.g., total successes and total failures)

  • The total of all statuses counted, and a warning (of sorts) if it's less than the total number of sims?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sums: Sure, I can add that.

Comparing to the total: This is possible, but kind of annoying to do at this point in the job. To find the total number of simulations that should exist, I think we have to pull buildstock.csv back out of assets.tar.gz on the cloud and re-count how many rows it has. (We already have this info locally if running the full pipeline, but may not if running postprocessing only.) Thoughts on how important this is? Or a simpler way to find the intended total?

Copy link
Member

Choose a reason for hiding this comment

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

If the total isn't readily available, I think it's fine to leave it out. We can easily pull that from elsewhere if needed.

@nweires nweires merged commit 427edca into gcp Jan 2, 2024
6 checks passed
@nweires nweires deleted the natalie/error_logs branch January 2, 2024 20:50
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.

3 participants