Benchmarking function calls using python decorators

To visualize performance bottlenecks, we want to know execution times for functions calls
Using time.time() makes the code ugly
Can we write a python decorator for this so that users only need to decorate their definitions

@wandb.timeit
def my_function(args)
    pass

Hi Parthe! Currently we do not support timers using decorators like this, but this sounds like a great feature that can be added to W&B! I’ll create a feature request for this and I’ll keep you posted with updates. For now, logging time.time() would be the best way to do this.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.