I've read that the proper way of defining global variables is to define them in
context
. Is there a way to pass the context class to a custom factor? The obvious trick of passing context as an argument of the
compute
function yields
Key error: 'window_safe'
.
Also, I have seen algorithms defining variables (typically parameters) outside the scope of any function. This may solve my problem. Is that discouraged, and why?