tinytqdm write support
Overview
This PR adds support for write that is commonly used in quite a few examples.
Here's an example of it after running the following:
from tinytqdm.helpers import tqdm
for i in tqdm(range(10)):
tqdm.write(str(i))
looks good, minor comment about test. Also have you run any full mlperf example? running anyone suffices but want to make sure the output logs are fine
let me test it with a full mlperf example and update the test case as well .
@chenyuxyz
Also have you run any full mlperf example? running anyone suffices but want to make sure the output logs are fine
the outputs do match between tqdm and tinytqdm:
| tinytqdm | tqdm |
|---|---|
https://github.com/tinygrad/tinygrad/actions/runs/10963049261/job/30443684158?pr=6359
it seems to have one more newline compared to tqdm (you can check the ones in master)
https://github.com/tinygrad/tinygrad/actions/runs/10963049261/job/30443684158?pr=6359 it seems to have one more newline compared to tqdm (you can check the ones in master)
@chenyuxyz that's interesting. running the same command locally, i didn't find anything unusual on my terminal printing newlines. i added a force flush when write is called. also, i was going to verify this myself but since i don't have the access to push to update_benchmarks, i'll leave it up to you to check again. i'll try to reproduce it on my end, if possible.
just pushed, still seeing extra rows
Changes
Name Lines Diff Tokens/Line Diff
------------------- ------- ------ ------------- ------
tinygrad/helpers.py 279 +2 15.5 -0.0
total lines changes: +2
@chenyuxyz - it looks like terminal and wandb look good:
training bert seems fine too https://wandb.ai/chenyuxyz/MLPerf-BERT/runs/m086t2l8?nw=nwuserchenyuxyz. will merge after CI finishes