Comments (15)
It's not really a warning, it's telling you what it's doing
from quip.
I know what it's doing - I gave it the (lack of) arguments. This message just litters my stdout (or stderr). I'd at least like a quiet mode.
from quip.
How about this:
- Change "WARNING" to "INFO" (or no prefix).
- Change verbosity from
normal
toverbose
(or evennerd
).
from quip.
I'd be happy with those changes
from quip.
OK. Shall I do a PR?
from quip.
Please go ahead if you have time
from quip.
I'm going to code it up with a separate message_type
string argument which will be "INFO"
here (and default to "WARNING"
for backward compatibility), and independent verbosity
, although one could imagine having the verbosity derived from the message type. I don't think it's worth it to recreate the complexity of python's logging/warning interface here. If someone else feels strongly about it, feel free to modify my PR or even just let me know.
I would perhaps consider replacing print_warning
with print_message
, because that can be updated with a search and replace: print_warning(message)
-> print_message('WARNING', message)
from quip.
I would prefer for it to not be named print_warning
when it may not be a warning at all. Also, print_warning
is anyway only a wrapper to not add the prefix explicitly. Is it worth it to have print_message
, which then calls print
, or could it be print
everywhere?
from quip.
Noam’s solution in the PR plus the offer of search and replace for print_message()
sounds a good compromise to me.
from quip.
I definitely don't want just print
, because if nothing else it'll be harder to do with a search and replace (adding a new initial argument is much easier with a regexp), but I'll do print_message()
.
from quip.
Or does that violate the "libatoms is dead, minimal changes only" principle, and I should just revert print_warning
and add print_info()
function? It's certainly less likely to lead to missed changes.
from quip.
I wasn't aware of that principle. 😅
Both print_message
and print_info
are possible solutions. I don't think it's likely that you miss a print_warning
.
Then again, print_warning
is such a simple procedure (a single string argument) that replacing it with print should not be that difficult. Although, I had single lines in mind, with multiple lines it would get ugly. Just checked: 11 out of 67 calls are multilined.
Edit: Oh wait, replacing with print("WARNING: " //
should be simpler than replacing with print_message(
plus additional arguments for multilined ones. 🤔
from quip.
I think print_warning()
-> print_message()
is a perfectly good solution. If you do the search/replace I'll approve and merge.
from quip.
Take a look at the latest commit.
from quip.
New release v0.9.11 including this PR is now on PyPI, so let the warnings be silenced!
from quip.
Related Issues (20)
- Compilation Error HOT 5
- Error while reading old trained models and dimer descriptors issue HOT 5
- Regarding Absolute Error of configurations of training set
- fatal error: mach/host_info.h: No such file or directory HOT 4
- Compilation Error HOT 1
- General trimer descriptor and gap_fit HOT 5
- QUIPPY installation issue
- SYSTEM ABORT: Traceback (most recent call last) File "/io/QUIP/src/GAP/gp_predict.f95", line 485 kind unspecified HOT 7
- gap_fit MPI Segmentation fault HOT 20
- Let's have the makefiles cry with very old compiler versions HOT 1
- gap_si_surface.ipynb: runtime error about dftb-params.xml HOT 1
- angle_3b not MPI ready HOT 2
- Empty output file from quip command HOT 37
- SYSTEM ABORT: Database was created with a later version of the code. (in LAMMPS) HOT 2
- LAMMPS + QUIP HOT 1
- Why is it possible to use multiple descriptors in the gap_fit command? HOT 2
- Python 3.12 support HOT 5
- "Iterative GAP fitting" example using ase Vasp calculator HOT 3
- potential parameters file HOT 4
- Error in Installing QUIP/GAP HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quip.