The new versions of maya would update the viewer reflect the context change. Their documentation states
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Rendering/files/GUID-4AE9AABC-A900-4276-AFE4-F9DCD96BA03D-htm.html [knowledge.autodesk.com]
OCIO configuration files allow for the use of contexts, which are essentially environment variables that refer to color transform files. Contexts can be used to facilitate per-shot color grading, for example.
If you are using OCIO contexts, you can change their value during a session without restarting Maya. To do this, use MEL or Python commands to change the environment variable and then refresh the color management preferences.
For example, suppose that your configuration file uses a context named SHOT, which is currently set to abc123.spi1d, and you want to change it to ijk456.spi1d. In this case, you can run the following lines of MEL in the Script Editor:
Does houdini to run a similar callback function to update the “context” so that viewer pickup the right color transform file? or is that something that automatically happens behind the scene.