Force cycles to recalculate light map from python

Hi, . When I change the cycles.sample_map_resolution from python, it doesn’t cause cycles to update in the viewport rendering. But when manually changing the value on the dropdown, cycles does update the importance map. How do we get cycles to update the importance map when it’s changed from python?

in fact changing the sample map resolution from python doesn’t appear to cause cycles to use the new settings even if manually restarting the viewport rendering. Is this a bug, or is there something else I need to call to force it to update the importance map?

turns out to be a bug: ⚓ T96829 updating importance map from python doesnt take effect, cycles continues to use the last manually set values.