Coder Social home page Coder Social logo

Hide device info prints in Python about comet HOT 6 OPEN

zouharvi avatar zouharvi commented on September 28, 2024
Hide device info prints in Python

from comet.

Comments (6)

ricardorei avatar ricardorei commented on September 28, 2024 2

You are right. It's just solved for the CLI interface. Ill reopen the issues as the current behaviour is still not the expected behaviour.

Meanwhile I'll leave here a snippet on how to run it in a quiet mode and silencing the underlying libraries.

import logging
loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict]
for logger in loggers:
    logger.setLevel(logging.WARNING)

Finally, you can run COMET with progress_bar=False :

model_output = model.predict(data, batch_size=8, gpus=1, progress_bar=False)

from comet.

ricardorei avatar ricardorei commented on September 28, 2024

Both pytorch lightning and transformers are very verbose.

I am adding a --quiet flag that sets all loggers to ERROR level. It will be included in the next release

from comet.

AlexUmnov avatar AlexUmnov commented on September 28, 2024

@ricardorei thanks for solving this issue a while back.
Is it possible to add it to the documentation, how to actually use this flag? I'm using version 2.0.0 from python and it's not obvious for me how to hide the device printouts.

from comet.

ricardorei avatar ricardorei commented on September 28, 2024

Its in the README:

comet-score -s src.de -t hyp1.en -r ref.en --quiet --only_system

from comet.

AlexUmnov avatar AlexUmnov commented on September 28, 2024

@ricardorei but the issue mentions calling comet from python. So am I. Not the cli

from comet.

AlexUmnov avatar AlexUmnov commented on September 28, 2024

I'm also getting a pytorch_lightning warning once I implement the code you suggested. Everything else is gone.

PossibleUserWarning: `max_epochs` was not set. Setting it to 1000 epochs. To train without an epoch limit, set `max_epochs=-1`.
  rank_zero_warn(

from comet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.