This is the error I see, I believe it is something to do with Opacus’ choices in terms of supported modules.
  File "main.py", line 351, in <module>
    main()
  File "main.py", line 225, in main
    synth_data, log_model_iw = model_map[args.model_class](**params)
  File "/Users/harrisonwilde/Library/Mobile Documents/com~apple~CloudDocs/PhD/Holmes/WeightedDP/models/CUSTOM/dptvae.py", line 247, in DPTVAE_runner
    gan.fit(df, categorical_columns=categorical_columns, ordinal_columns=ordinal_columns, verbose=True, seed=seed)
  File "/Users/harrisonwilde/Library/Mobile Documents/com~apple~CloudDocs/PhD/Holmes/WeightedDP/models/CUSTOM/utils/synthesiser.py", line 68, in fit
    self.gan.train(preprocessed_data, categorical_columns=categorical_columns, ordinal_columns=ordinal_columns, update_epsilon=self.epsilon, verbose=verbose)
  File "/Users/harrisonwilde/Library/Mobile Documents/com~apple~CloudDocs/PhD/Holmes/WeightedDP/models/CUSTOM/dptvae.py", line 138, in train
    privacy_engine.attach(self.optimizerAE)
  File "/usr/local/Caskroom/miniconda/base/envs/dp/lib/python3.8/site-packages/opacus/privacy_engine.py", line 161, in attach
    self.validator.validate(self.module)
  File "/usr/local/Caskroom/miniconda/base/envs/dp/lib/python3.8/site-packages/opacus/dp_model_inspector.py", line 113, in validate
    raise IncompatibleModuleException(message)
opacus.dp_model_inspector.IncompatibleModuleException: Model contains incompatible modules.
Some modules are not valid.: ['Main']