Build tfprof.AdvisorOptionsProto. Args: options: A dictionary of options. See ALL_ADVICE example. Returns: tfprof.AdvisorOptionsProto.
(options)
| 104 | |
| 105 | |
| 106 | def _build_advisor_options(options): |
| 107 | """Build tfprof.AdvisorOptionsProto. |
| 108 | |
| 109 | Args: |
| 110 | options: A dictionary of options. See ALL_ADVICE example. |
| 111 | Returns: |
| 112 | tfprof.AdvisorOptionsProto. |
| 113 | """ |
| 114 | opts = tfprof_options_pb2.AdvisorOptionsProto() |
| 115 | if options is None: |
| 116 | return opts |
| 117 | for checker, checker_opts in six.iteritems(options): |
| 118 | checker_ops_pb = tfprof_options_pb2.AdvisorOptionsProto.CheckerOption() |
| 119 | for k, v in six.iteritems(checker_opts): |
| 120 | checker_ops_pb[k] = v |
| 121 | opts.checkers[checker].MergeFrom(checker_ops_pb) |
| 122 | return opts |
| 123 | |
| 124 | |
| 125 | @tf_export(v1=['profiler.Profiler']) |