def to_dict(self, by_alias: bool = False):
        """Returns the dictionary representation of the model"""
        _dict = self.dict(by_alias=by_alias,
                          exclude={
                          },
                          exclude_none=True)
        # override the default output from pydantic by calling `to_dict()` of loader
        if self.loader:
            _dict['loader' if by_alias else 'loader'] = self.loader.to_dict(by_alias=by_alias)
        # override the default output from pydantic by calling `to_dict()` of model
        if self.model:
            _dict['model' if by_alias else 'model'] = self.model.to_dict(by_alias=by_alias)
        # override the default output from pydantic by calling `to_dict()` of trainer
        if self.trainer:
            _dict['trainer' if by_alias else 'trainer'] = self.trainer.to_dict(by_alias=by_alias)
        # override the default output from pydantic by calling `to_dict()` of criterion
        if self.criterion:
            _dict['criterion' if by_alias else 'criterion'] = self.criterion.to_dict(by_alias=by_alias)
        # override the default output from pydantic by calling `to_dict()` of optimizer
        if self.optimizer:
            _dict['optimizer' if by_alias else 'optimizer'] = self.optimizer.to_dict(by_alias=by_alias)
        # override the default output from pydantic by calling `to_dict()` of collate
        if self.collate:
            _dict['collate' if by_alias else 'collate'] = self.collate.to_dict(by_alias=by_alias)
        return _dict
Returns the dictionary representation of the model
lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly.py