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

code to make the cams2_83 mos evaluation work #1166

Merged
merged 24 commits into from
May 14, 2024
Merged

Conversation

charlienegri
Copy link
Collaborator

@charlienegri charlienegri commented May 11, 2024

Change Summary

add code to make it possible to run the MOS/ENS evaluation starting from pre-made colocated data

this addresses https://github.com/metno/AeroToolsIssues/issues/1

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

…starting point is supposed to be pre-made colocated data, hence the only_json-no-obs-read logic
… too for colocated data in place in the coldata_path to be read and processed, tested with a run on PPI
… too for colocated data in place in the coldata_path to be read and processed, tested with a run on PPI
…S2_83_Processer, it used col.get_available_coldata_files(var_list), which reads data only from standard subfolders, which are not the relevant ones for the median scores
Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 71.20000% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 78.79%. Comparing base (5485b4a) to head (f4697fc).
Report is 3 commits behind head on main-dev.

Files Patch % Lines
pyaerocom/scripts/cams2_83/evaluation.py 66.21% 25 Missing ⚠️
pyaerocom/scripts/cams2_83/engine.py 0.00% 7 Missing ⚠️
pyaerocom/aeroval/experiment_processor.py 0.00% 2 Missing ⚠️
pyaerocom/scripts/cams2_83/cli_mos.py 94.44% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1166      +/-   ##
============================================
+ Coverage     78.75%   78.79%   +0.04%     
============================================
  Files           127      128       +1     
  Lines         20105    20164      +59     
============================================
+ Hits          15833    15889      +56     
- Misses         4272     4275       +3     
Flag Coverage Δ
unittests 78.79% <71.20%> (+0.04%) ⬆️

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.

@heikoklein heikoklein added this to the m2024-06 milestone May 13, 2024
@charlienegri charlienegri marked this pull request as ready for review May 13, 2024 08:22
Copy link
Member

@heikoklein heikoklein left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor comments.

logger.warning(
f"The given pool {pool} is larger than the maximum CPU count {mp.cpu_count()}. Using that instead"
)
pool = mp.cpu_count()
Copy link
Member

Choose a reason for hiding this comment

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

You can give a warning, but let the user shoot in his own foot.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how about setting it to 1 then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nvm, I like your approach best

Copy link
Member

Choose a reason for hiding this comment

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

I can create 5000 processes without problems on my 6-core machine. Why not just let the user do what he asked for, even if it does not make sense to you?

"--pool",
"-p",
min=1,
max=cpu_count(),
Copy link
Member

Choose a reason for hiding this comment

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

Don't set cpu_count() as maximum if you don't know if this is right.

Some tasks are IO bound, so a maximum of 4 is often too much in this case. In theory, we could have tasks which connect to external resources, so that we might want to use much more than the cpus available. (A process based webserver setup used to be 2-4 times the number of cores.)

We don't need to add a maximum here.

"--pool",
"-p",
min=1,
max=cpu_count(),
Copy link
Member

Choose a reason for hiding this comment

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

remove, see above

"maps.php",
"intercomp.php",
"overall.php",
]
Copy link
Member

Choose a reason for hiding this comment

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

Do we still write .php pages? I thought @AugustinMortier had removed those?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have no idea but this is main-dev code, so I'd rather address that somewhere else than in this PR

Copy link
Member

Choose a reason for hiding this comment

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

ok

…ead of subcommands, so that we do not break the commands deployed in production now for the standard experiments
@charlienegri
Copy link
Collaborator Author

tested with a MOS/ENS evaluation run

@charlienegri charlienegri merged commit 015d473 into main-dev May 14, 2024
7 of 8 checks passed
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