Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jit.ignore to prototype optimizers
Summary: `torch.compile` doesn't seem to cause errors if we deprecate an optimizer that is no longer used, but `torch.jit.script` will. `torch.jit.script` seems to check and ensure all decision branches are alive. See [simplified Bento example](https://fburl.com/anp/rbktkl08) To make prototype optimizers easily deprecated once included in production, we wrap the invoker function with `torch.jit.ignore`. This means that we need to always keep auto-generating the `lookup_{}.py` even the optimizers are deprecated and their backends are removed. **Usage** Add `"is_prototype_optimizer": True` for the optimizer in `/codegen/genscript/optimizers.py` Example: ``` def ensemble_rowwise_adagrad_optimizer: return { "optimizer": "ensemble_rowwise_adagrad", "is_prototype_optimizer": True, } ``` Reviewed By: q10 Differential Revision: D60943180
- Loading branch information