Skip to content

Commit d3c3e86

Browse files
Name scalar based on percentile to report (#478)
Before this patch, the scalar name would end up as containing the value of the percentile rather than the percentile that we are trying to compute. We then end up with a bunch of one point metrics which clutters the UI and also means we cannot get any information about the actual percentiles. This patch fixes that by actually naming the scalar after the percentile that we are trying to compute.
1 parent 087d446 commit d3c3e86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler_opt/es/blackbox_learner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _log_tf_summary(self, rewards: list[float]) -> None:
196196
for percentile_to_report in _PERCENTILES_TO_REPORT:
197197
percentile_value = np.percentile(rewards, percentile_to_report)
198198
tf.summary.scalar(
199-
f'reward/{percentile_value}_percentile',
199+
f'reward/{percentile_to_report}_percentile',
200200
percentile_value,
201201
step=self._step)
202202

0 commit comments

Comments
 (0)