Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do-notation API for logging everything in one step #73

Open
ToucheSir opened this issue Aug 7, 2020 · 2 comments
Open

do-notation API for logging everything in one step #73

ToucheSir opened this issue Aug 7, 2020 · 2 comments

Comments

@ToucheSir
Copy link
Contributor

Following #8 and #9, would it be feasible to integrate an API along the lines of:

...
with_logger(lg) do
    for i=1:100
        # increments log_step_increment by one by default
        # could also take a custom increment as an optional parameter
        with_step() do
            @info "test" i=i        
        end
    end
end

For use-cases where one only wants to increment the step once per iteration (e.g. to match tensorflow's behaviour), this would eliminate the need to specify log_step_increment=0 on the remaining N-1 logging calls.

@nomadbl
Copy link
Contributor

nomadbl commented Jul 5, 2023

@ToucheSir
Great idea!
I've implemented it in the above PR.
Would be great if you can review it.
(Shameless plug - please review my other PR's 🙏 )

@ToucheSir
Copy link
Contributor Author

I'm not a maintainer of this repo and I haven't used this package for a while, but will look at the PR. A better bet for you will be to get some contributor attention instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants