Giter Site home page Giter Site logo

Comments (11)

crk-codaio avatar crk-codaio commented on July 24, 2024 3

Sorry for not having an update on this. We are looking into it internally and seeing if there is a way we can make this work. From the screencast you've pasted, clearly the log lines from tqdm are:

  1. Getting buffered (and hence seeing it later)
  2. Not seeing updates of progress - this is the one I need to spend more time debugging if there is a way to make it work with our log buffering + multiprocessing solution.

from metaflow.

crk-codaio avatar crk-codaio commented on July 24, 2024 2

Thank you for the very elaborate description (with screencasts :))
Will take a look and get back to you.

from metaflow.

crk-codaio avatar crk-codaio commented on July 24, 2024 1

I don't have any new updates about this. Few related comments though -

  1. We are reworking our log streaming (and tailing) solution internally; and we hope to announce it externally as well after converging the codebases. We hope to make log tailing using the metaflow client so issues w.r.t buffering and tailing should be better after that.
  2. Specifically for observing progress of foreach tasks and making it work with tqdm, have you considered doing the progress tracking outside of Metaflow - probably in a separate wrapper script; by outputting special lines perhaps after each iteration like print("<SHOW PROGRESS 1%>").
    I don't know tqdm well enough to know if you can use special log lines to bump up the progress.

Curious to hear to your response? I also apologize for extremely slow response rate from my front on this issue.

from metaflow.

crypdick avatar crypdick commented on July 24, 2024 1

@jonaschn I came up with a solution which is a little less intrusive: https://stackoverflow.com/questions/68225881/how-to-show-tqdm-progress-in-metaflow

@tuulos Is there a way to make MetaFlow show stderr output instead of hiding it

from metaflow.

jonaschn avatar jonaschn commented on July 24, 2024

@seeravikiran Do you have any update on this?

from metaflow.

leftys avatar leftys commented on July 24, 2024

The buffering issue happened to me with lightgbm training output. The training results are not printed every iteration, but at the end.

from metaflow.

crk-codaio avatar crk-codaio commented on July 24, 2024

Unfortunately I don't have an update on this yet. Apologies for that.

from metaflow.

jonaschn avatar jonaschn commented on July 24, 2024

@seeravikiran Do you have any update on this?

from metaflow.

mattlbeck avatar mattlbeck commented on July 24, 2024

I have also stumbled into this issue. Have tried various methods for forceably releasing the buffer on each iteration but I clearly don't understand enough about how metaflow is capturing logs to identify a workaround.

from metaflow.

mattlbeck avatar mattlbeck commented on July 24, 2024

I think tqdm might be messing with buffer flushing in unexpected ways. Running the below flow with and without tqdm set in the for loop def shows that all print output is witheld until the end of the step only when tqdm is used:

from metaflow import FlowSpec, step
import tqdm
from time import sleep

class TQDMFlow(FlowSpec):

    @step
    def start(self):
        print('Training...')
        for t in tqdm.tqdm(range(100)):
            print(t)
            sleep(0.004)
        sleep(5)
        self.next(self.end)

    @step
    def end(self):
        pass


if __name__ == '__main__':
    TQDMFlow()

from metaflow.

tuulos avatar tuulos commented on July 24, 2024

more discussions here https://outerbounds-community.slack.com/archives/C020U025QJK/p1624953736201700

here's a workaround https://share.getcloudapp.com/4guneg9E

https://gist.github.com/tuulos/ca8029e3d2ce8141226e4b7a474f4750

from metaflow.

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.