`wandb.save` doesn't upload empty files to `wandb` server
See original GitHub issueAswandb.save doesn’t uplopad the empty files to the wandb remote, I’d suggest you to add a warning message in case the file is empty so as to let the user know that the file won’t be uploaded.
To calculate the file size if it exists you can just os.path.getsize(path) as described in https://docs.python.org/3/library/os.path.html#os.path.getsize, which raises an OSError in case the file doesn’t exist or is unaccesible, and the size in bytes if it succeeds, so something like:
...
if os.path.getsize(glob_str) == 0:
warnings.warn(f"File {glob_str} is empty and won't be uploaded")
return
...
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Save & Restore Files - Documentation - Weights & Biases
Saving Files · 1. Use wandb.save(filename) . · 2. Put a file in the wandb run directory, and it will get uploaded at...
Read more >Launch Experiments with wandb.init - Documentation
This error indicates that the library is having difficulty launching the process which synchronizes data to the server. The following workarounds can help ......
Read more >No config file and system plots for offline runs - W&B Help
When uploading offline runs, there is no config shown in the dashboard. Additionally, there are also no system plots.
Read more >Troubleshooting - Documentation - Weights & Biases - Wandb
This is likely a connection problem — if your server loses internet access and ... Calling wandb.log writes a line to a local...
Read more >Agent bug? File not found error - W&B Help - WandB community
The error you are getting 'No such file or directory' is appearing because Run 9uvr1lj3 is not available. The only sweep available in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure! We happily accept PRs, it would be awesome if you could submit a PR. One of our enigneers could review it.
WandB Internal User commented: ramit-wandb commented: Sure! We happily accept PRs, it would be awesome if you could submit a PR. One of our enigneers could review it.