Open
Description
With all the information we have floating around with how to best use Engine + TFQ we might want to add a page like this: https://cirq.readthedocs.io/en/latest/google/best_practices.html
but for TFQ soon. Major points we need to make are:
- Minimizing calls to the service where possible.
- Controlling parallelism at op level with
tf.CriticalSection
ortf.control_dependencies
- Controlling parallelism in layers and differentiators with (low_latency boolean) [Yet to be implemented].
- Use of SampledExpectation where possible with understanding of how
samples_per_term
will scale the cost. - Encourage tf model check-pointing in case experiments need to be interrupted and resumed across time slots.
- All best practices from here https://cirq.readthedocs.io/en/latest/google/best_practices.html as well.
I'm sure I've missed a few things so we should definitely work to add to this list over time.