def _build_model_properties(self, model_properties: dict) -> HuggingFaceModelProperties:
        """Convert the user input model_properties to HuggingFaceModelProperties."""
        try:
            parsed_properties = HuggingFaceModelProperties(**model_properties)
        except ValidationError as e:
            raise InvalidModelPropertiesError(f"Invalid model properties: {model_properties}. Original error {e}") \
                from e

        if self._model_flags.trust_remote_code or self._tokenizer_flags.trust_remote_code:
            if not parsed_properties.trust_remote_code:
                raise InvalidModelPropertiesError(
                    f"The specified model requires the 'trustRemoteCode' attribute to be set to True. "
                    f"Setting this attribute to True may have security implications. "
                    f"See {marqo_docs.hugging_face_trust_remote_code()} for more information"
                )

        return parsed_properties
Convert the user input model_properties to HuggingFaceModelProperties.
src/marqo/inference/native_inference/embedding_models/hugging_face_model.py