Code Monkey home page Code Monkey logo

Comments (10)

cwmeijer avatar cwmeijer commented on September 23, 2024

I agree, we should check how to make it be quiet by default.

from platalea.

cwmeijer avatar cwmeijer commented on September 23, 2024

According to (wandb/wandb#764 (comment)), you can completely disable & silence wandb, making all calls to the package a noop without raising exceptions. This can be done by running:
wandb disabled
I think this should be enough. It doesn't seem simple to somehow make disabling wandb part of Platalea's installation procedure in order to make it disabled by default. It would make sense to make it part of the documentation I guess or to point to the command above in a print message. I'm not sure what would make the most sense. Any ideas? (adding help wanted label)

from platalea.

cwmeijer avatar cwmeijer commented on September 23, 2024

Let's implement both options ot inform user of how to disable wandb:

  • comment in readme
  • print in output when running the code

from platalea.

bhigy avatar bhigy commented on September 23, 2024

I don't know how I missed that but according to wandb/wandb#764 (comment), it seems possilbe to set the mode in the code when initializing wandb. It would be nice to add q parameter to set this which would be set to disabled by default. I am using platalea for another project and asking people to disable wandb manually is cumbersome.

I'll see if I can work on that today.

from platalea.

bhigy avatar bhigy commented on September 23, 2024

One limit of using a command line parameter (e.g. wandb_mode) is that we override wandb functionalities (such as using the command wandb offline or setting the environment variable WANDB_MODE. I need to see whether there is a better way to handle this.

from platalea.

cwmeijer avatar cwmeijer commented on September 23, 2024

Overriding is maybe not too bad. I would be fine with just adding '--wand_mode on' with every run.

from platalea.

bhigy avatar bhigy commented on September 23, 2024

I tried to find a way to just set disabled as the default instead of online but there is no way to know for sure whether the value online is the default and can be overwritten or has been set explicitly by the user. Also having a global option --wandb_mode seems redundant.

One solution that seems better to me is to transfer the responsability of this to the experiment script (e.g. basic.py). By adding a parameter to the experiment function, we can decide how to handle this for each experiment (keep the current behavior, disable completely wandb, add an experiment-specific switch). This way, in the experiment I will use for the zerospeech challenge I can just disable it by default.

from platalea.

bhigy avatar bhigy commented on September 23, 2024

Maybe also allow running experiments without installing it.

from platalea.

egpbos avatar egpbos commented on September 23, 2024

Maybe also allow running experiments without installing it.

We can make it an optional dependency. Then, instead of importing, we can do something like this (wrapped in a function perhaps so we don't have to repeat everywhere):

try:
    import wandb
except ImportError:
    class PassClass:
        def __getattr__(self, name):
            def dummy_func(*args, **kwargs):
                pass
            return dummy_func
    wandb = PassClass()

This way, when the module is not installed, wandb.anything(something, whatever=bla) will just pass, i.e. do nothing. So all the wandb.function() calls can just stay in and don't have to be wrapped in if statements.

from platalea.

bhigy avatar bhigy commented on September 23, 2024

First part (disabling by default) has been implemented in the branch zerospeech21-vg.

from platalea.

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.