lucid
lucid copied to clipboard
Rethink render_vis outputs
Initially noted as render_viz being hard to test, I'd like to rethink some of its output.
At the moment we have no way of accessing the numerical values of the objectives or print_objectives.
I could see the results of render_viz containing all of this metadata.
This could fit into a configurable stopping criterion, with defaults being based on thresholds, but also offer running to convergence (in some default metric) or running to an arbitrary stopping criteria lambda function. This function could have access to the objective values/metadata described above and, for example, allow optimizing until a certain class probability becomes bigger than another class's probability, etc.
Stopping based on objective:
objective = …
stop_f: lambda data: data.values[objective] > 1.0
render_viz(…, stop_f: stop_f, …)
Stopping based on global_step:
stop_f: lambda data: data.global_step > 1024
render_viz(…, stop_f: stop_f, …)
Plausible default:
stop_f: lambda data: data.global_step > max(data.kwargs['thresholds'])
@colah Made a convincing point that render_vis is more like a user interface and I should really be testing make_vis_T. I will try that first.