Comments (11)
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:
- Getting buffered (and hence seeing it later)
- 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.
Thank you for the very elaborate description (with screencasts :))
Will take a look and get back to you.
from metaflow.
I don't have any new updates about this. Few related comments though -
- 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.
- 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.
@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.
@seeravikiran Do you have any update on this?
from metaflow.
The buffering issue happened to me with lightgbm training output. The training results are not printed every iteration, but at the end.
from metaflow.
Unfortunately I don't have an update on this yet. Apologies for that.
from metaflow.
@seeravikiran Do you have any update on this?
from metaflow.
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.
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.
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)
- Allow namespacing of `ArgoEvent` when published from a step
- allow uploading metaflow packages that include "dots" in the path
- Suggest replacing `pull_request_target` in branches as well as `main`
- Bug: Passing an `S3PutObject` to `s3.put_files` treated as `tuple` of key path values.
- Allow passing of `trusted-host` parameter to `@pypi` decorator.
- Unable to utilise pytest unit test for metaflow HOT 1
- Update extras_require for tracing dependencies?
- R tests on Github fail with macos-latest runner
- Argo-workflows with name > 52 characters fail if run as CronWorkflows HOT 1
- Introduce support for private registry for AWS Batch
- Write metadata about log scrubbing events
- Language-agnostic API and/or other language SDKs for the client API HOT 1
- Performance Degradation When Running PyCaret Model with n_jobs > 1 Inside Metaflow
- Question on Executing Metaflow Workflow from Python Script Without 'run' Argument HOT 3
- Resume Doesn't Resume from the Last Failed Step
- Argo Events: trigger sensors are not deleted
- Allow option to set labels on pods using `kubernetes` decorator
- Bug: Runner API doesn't pass parameters to flows as expected HOT 4
- Log failure reason in slack alerts for deployed flow failures
- Display full trigger event payload in metaflow ui
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 metaflow.