iiasa / ixmp

The ix modeling platform for integrated and cross-cutting scenario analysis
https://docs.messageix.org/ixmp
Apache License 2.0
38 stars 112 forks source link

Disable console output #84

Open tzipperle opened 6 years ago

tzipperle commented 6 years ago

Hi, is there a easy opition to disable all output from the console?

for e.g. ... DEBUG at.ac.iiasa.ixmp.database.DbDAO:1695 ... --- Job MESSAGE_run.gms ...

danielhuppmann commented 6 years ago

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

gidden commented 6 years ago

There is probably something doable via the GAMS CLI. If so, we could check the log level and do something intelligent accordingly..

On Fri, Aug 31, 2018, 7:50 AM Daniel Huppmann notifications@github.com wrote:

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iiasa/ixmp/issues/84#issuecomment-417559012, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVAEUQEpcgFsi6C5bxJw30rENV96-sIks5uWM6LgaJpZM4WTiWz .

tzipperle commented 6 years ago

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

Is there a planned release date yet?

gidden commented 6 years ago

Hi Thomas - we're shooting for the end of the month.

On Fri, Sep 21, 2018 at 9:50 AM Thomas Zipperle notifications@github.com wrote:

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

Is there a planned release date yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iiasa/ixmp/issues/84#issuecomment-423446382, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVAEczwvkFnGWOGdJQO0vNL1TfoF4xuks5udJpcgaJpZM4WTiWz .

tzipperle commented 6 years ago

Thanks @gidden for the information.

What is the best way to test the new renewable implementation until the release?

conda uninstall --force message_ix

pip install git+https://github.com/iiasa/message_ix.git@hackathon-prs

Do I have to change also something at the ixmp installation?

gidden commented 6 years ago

You will need the latest ixmp master branch, but I think that is all. @danielhuppmann the ixmp master branch is aligned with hackathon-prs right?

gidden commented 6 years ago

Ah, also if you want to test out disabling console output, you will need iiasa/ixmp#88

gidden commented 6 years ago

which you can do with ixmp.Platform.set_log_level('NOTSET')

tzipperle commented 6 years ago

Thanks, I will try it...

tzipperle commented 6 years ago

Installation workflow:

conda uninstall --force ixmp
conda uninstall --force message-ix

install ixmp

git clone https://github.com/danielhuppmann/ixmp.git
git checkout newjar
python setup.py install

install message_ix

git clone https://github.com/iiasa/message_ix.git
git checkout hackathon-prs
python setup.py install && pytest tests

Error:

--- MESSAGE_run.gms(199) 4 Mb


*** Abort "The MESSAGEix version and the MESSAGE-scheme definition in the installed ixmp package do not match!"
***

I also had to remove my local database due to migration issues.

danielhuppmann commented 6 years ago

yes, #88 brings in a extended MESSAGE-scheme (v1.1) - you'll need the branch from https://github.com/iiasa/message_ix/pull/113 to be in sync between MESSAGEix and ixmp.

Can you send me a screenshot of the flyway migration issues with your local database?

gidden commented 6 years ago

@danielhuppmann I guess we will see this when we rerun CI?

tzipperle commented 6 years ago

yes, #88 brings in a extended MESSAGE-scheme (v1.1) - you'll need the branch from iiasa/message_ix#113 to be in sync between MESSAGEix and ixmp.

Can you send me a screenshot of the flyway migration issues with your local database?

with this config MESSAGEix an ixmp now works for me, but the migration issue is also there:

jpype._jexception.FlywayExceptionPyRaisable: org.flywaydb.core.api.FlywayException: Validate failed: Migration checksum mismatch for migration 1 -> Applied to database : 1588531206 -> Resolved locally : 822227094

danielhuppmann commented 6 years ago

The problem with the checksum mismatch is due to different line endings (LF vs. CRLF) - before, that was local-system-dependent, but it will be consistent going forward. Otherwise, it would not be possible to hand over hsqldb files between Windows and Linux.

Two options for now: if you have nothing important in your local db, delete and start fresh. Otherwise, open the HSQLDB with your favourite sql dev tool and update the schema_version table manually.

tzipperle commented 6 years ago

I have tried the logger option. However, the name NOTSET is maybe a little bit confusing. In python NOTSET allows all levels.

import logging

logging.basicConfig(level=logging.NOTSET)
log = logging.getLogger()

log.debug('debug')
log.info('info')
log.warning('warning')
log.error('error')
log.critical('critical')