      monkeypatch.setattr("os.environ", {})  # Environment variable not set, dummy in config file
      monkeypatch.setattr("os.path.isfile", lambda x: True)
      monkeypatch.setattr("builtins.open", lambda *args, **kwargs: StringIO('{"backend": "amd"}'))
      backend = _Backend()
      assert backend.backend == "amd"
  
      monkeypatch.setattr("os.path.isfile", lambda x: False)  # no config file, dummy in user input
      monkeypatch.setattr("builtins.input", lambda x: "3")
      backend = _Backend()
      assert backend._configure_backend() == "nvidia"
 
</s> remove     monkeypatch.setattr("builtins.open", lambda *args, **kwargs: StringIO('{"backend": "amd"}'))
 </s> add     monkeypatch.setattr("builtins.open", lambda *args, **kwargs: StringIO('{"backend": "cpu"}')) </s> remove     file = ('{"test": "param"}')
 </s> add     file = '{"test": "param"}' </s> remove             correct_ifft = lambda shape, s=[None]: np.fft.irfft(shape, s[0])  # noqa
 </s> add             correct_ifft = lambda shape, s=[None]: np.fft.irfft(shape, s[0])  # noqa:E501,E731 # pylint:disable=unnecessary-lambda-assignment </s> remove     assert ((_BACKEND in ("cpu", "directml") and lib == "tensorflow")
            or (_BACKEND == "amd" and lib == "plaidml"))
 </s> add     assert _BACKEND in ("cpu", "directml") and lib == "tensorflow" </s> remove             retval = (os.path.basename(prefix) == "envs")
 </s> add             retval = os.path.basename(prefix) == "envs"
    assert backend.backend == "cpu"
      monkeypatch.setattr("os.environ", {})  # Environment variable not set, dummy in config file
      monkeypatch.setattr("os.path.isfile", lambda x: True)
      monkeypatch.setattr("builtins.open", lambda *args, **kwargs: StringIO('{"backend": "amd"}'))
      backend = _Backend()
    assert backend.backend == "cpu"
  
      monkeypatch.setattr("os.path.isfile", lambda x: False)  # no config file, dummy in user input
      monkeypatch.setattr("builtins.input", lambda x: "3")
      backend = _Backend()
      assert backend._configure_backend() == "nvidia"
keep keep keep keep replace keep keep keep keep keep
 Remove plaidML support (#1325)

* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports 
tests/lib/utils_test.py