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

Adding warning message for demo server #975

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

mikibonacci
Copy link
Member

@mikibonacci mikibonacci commented Dec 15, 2024

This fixes #973

I will wait to merge this, as soon as #971 will be merged, so I can put the new variable name for the max cpus available in localhost (no more localhost_cpus).

mikibonacci and others added 2 commits December 15, 2024 22:45
This is for small deployment (max cpus localhost < 3), and when
precise protocol is chosen. This should be indeed triggered for
small deployment like the Demo Server.
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.43%. Comparing base (b288780) to head (7136b86).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...iidalab_qe/app/submission/global_settings/model.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
+ Coverage   68.40%   68.43%   +0.02%     
==========================================
  Files         111      111              
  Lines        6293     6292       -1     
==========================================
+ Hits         4305     4306       +1     
+ Misses       1988     1986       -2     
Flag Coverage Δ
python-3.11 68.43% <66.66%> (+0.04%) ⬆️
python-3.9 68.44% <66.66%> (+0.01%) ⬆️

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.

Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM @mikibonacci. Thanks!

@mikibonacci mikibonacci merged commit 936eadb into aiidalab:main Dec 19, 2024
3 of 7 checks passed
@mikibonacci mikibonacci deleted the fix/warning_precise_small_depl branch December 19, 2024 17:21
Comment on lines +147 to +155
if (
on_localhost and protocol == "precise" and localhost_cpus < 4
): # This means that we are in a small deployment.
alert_message += (
f"Warning: The selected protocol is {protocol}, which is computationally demanding to run on localhost. "
f"Consider the following: <ul>"
+ suggestions["change_configuration"]
+ "</ul>"
)
Copy link
Member

Choose a reason for hiding this comment

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

Hey @mikibonacci. I didn't notice it in the review, but what is localhost_cpus? It doesn't exist. What should be the logic here? Also, one of the tests failed?

edan-bainglass added a commit to edan-bainglass/aiidalab-qe that referenced this pull request Dec 19, 2024
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.

Show always warning on demo server if protocol is precise
2 participants