[go: up one dir, main page]

Skip to content

Allow to specify optional keyword arguments in `get_state` (and `save_state`)

The CCreator.get_state method is used to returns the object state dictionary. This can be overridden in the library, as done for example in CClassifierPyTorch, adding optional arguments. Currently, however, there is no way to specify a value for these optional arguments from the top of the hierarchy.

We should include **kwargs in CCreator.get_state and pass them to any subsequent calls to get_state. The dictionary will be expanded when needed automatically, for example in CClassifierPyTorch. The corresponding saving method save_state should be updated in the same way.

Change the signature and add **kwargs to any call to get_state and save_state in:

  • CCreator
  • CClassifierMulticlass
  • CClassifierPyTorch
  • CFigure
  • CPlot

This improvement should not affect any previously exported class or model.

Add a testcase in TestCNormalizerPyTorch about this (calling return_optimizer)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information