              return
          legacy_update = self._update_legacy_config()
          # Add any new items to state config for legacy purposes where the new default may be
          # detrimental to an existing model.
          legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                   "mask_loss_function": "mse",
                                                                   "l2_reg_term": 100,
                                                                   "optimizer": "adam",
                                                                   "mixed_precision": False}
          for key, val in _CONFIG.items():
              if key not in self._config.keys():
                  setting: ConfigValueType = legacy_defaults.get(key, val)
                  logger.info("Adding new config item to state file: '%s': '%s'", key, setting)
                  self._config[key] = setting
 
</s> remove         self._windows: List[str] = []
 </s> add         self._windows: list[str] = [] </s> remove             cuda_req = val[0]
            cudnn_req = val[1].split(".")
            if cuda_req == self._env.cuda_version and (cudnn_req[0] == cudnn_inst[0] and
                                                       cudnn_req[1] <= cudnn_inst[1]):
 </s> add             cuda_req = next(parse_requirements(f"cuda{val[0]}")).specs
            cudnn_req = next(parse_requirements(f"cudnn{val[1]}")).specs
            if (self._validate_spec(cuda_req, cuda_inst)
                    and self._validate_spec(cudnn_req, cudnn_inst)): </s> remove             all_loss: Dict[str, List[float]] = {}
 </s> add             all_loss: dict[str, list[float]] = {} </s> remove             retval: Dict[str, np.ndarray] = {key: np.array(val, dtype="float32")
 </s> add             retval: dict[str, np.ndarray] = {key: np.array(val, dtype="float32") </s> remove                         detected_faces: List[DetectedFace]) -> List[DetectedFace]:
 </s> add                         detected_faces: list[DetectedFace]) -> list[DetectedFace]:
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
              return
          legacy_update = self._update_legacy_config()
          # Add any new items to state config for legacy purposes where the new default may be
          # detrimental to an existing model.
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
        legacy_defaults: dict[str, str | int | bool] = {"centering": "legacy",
                                                        "mask_loss_function": "mse",
                                                        "l2_reg_term": 100,
                                                        "optimizer": "adam",
                                                        "mixed_precision": False}
          for key, val in _CONFIG.items():
              if key not in self._config.keys():
                  setting: ConfigValueType = legacy_defaults.get(key, val)
                  logger.info("Adding new config item to state file: '%s': '%s'", key, setting)
                  self._config[key] = setting
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
plugins/train/model/_base/model.py