tensorflow / tensorflow/probability
Optimizators Step Tracking
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Seems the optimizers do not expose the step they are in during their loops, for example in the inner function of the BFGS optimizer.
This value is required to use the tf.summary API
tf.summary.scalar('loss', avg_loss.result()))
The specific error is:
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/summary_ops_v2.py in write(tag, tensor, step, metadata, name)
647 step = get_step()
648 if step is None:
--> 649 raise ValueError("No step set via 'step' argument or "
650 "tf.summary.experimental.set_step()")
651 if metadata is None:
ValueError: No step set via 'step' argument or tf.summary.experimental.set_step()
Maybe for the common use cases, the optimization loop is so fast that it would not be very useful, but I would like to hear your thoughts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the BFGS optimizer's inner function and comparing how optimizer loops track iterations. Review how the tf.summary API receives its step value and determine the intended scope across optimizers. Done means the relevant optimization loops expose a usable step so tf.summary no longer raises the reported missing-step error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100