cooper-org/cooper

Loading state_dict of dual_schedulers

Closed this issue · 1 comments

Bug

The instantiation of the dual_scheduler inside ConstrainedOptimizer.load_from_state_dict method has a bug. The variable containing the dual scheduler class is called dual_scheduler_class as opposed to dual_scheduler.

dual_scheduler = dual_scheduler(dual_optimizer)

Steps

Replace current line to dual_scheduler = dual_scheduler_class(dual_optimizer)

Expected behavior

This should enable the loading of a dual_scheduler from a checkpoint.

Closed by #44