I am trying to integrate an externally-hosted model into Modelling Objectives. However, it requires an OAuth flow with an Identity provider.
The Modelling Objectives UI only allows to import one egress policy. I couldn’t find a way to integrate Outbound Application with MO. Also, it is not possible to import a RestAPI data connection in the model adapter library.
If your egress polices are already imported into your project, then any live deployment spun up within the project will also have access to all egress policies. The egress policy selection in this UI flow restricts what policy can be used with this external model within a code repository.
So for your use case I would recommend you author your model adapter with the assumption that it will have access to these external endpoints. Your clientId/secret can be passed via credentials during the UI flow of creating an external model so you can access them securely in your model adapter. Once your external model is published via the UI flow then you can use it to spin up a live deployment. Hope this helps!
Thanks for the suggestion - it served as inspiration to find an alternative approach.
You suggested to ignore the egress policies in the model adapter and then wrap the transform with the relevant egress policies. Since one doesn’t necessarily have to leverage the RestAPI data connection client for public endpoints this works. The approach solves the integration with models deployed with public IPs but not in private networks. Those models need to be access through Agent-proxy and one needs to use the client.
I discover one can install transform-external-systems package and add the Source class to the run_inference abstract method. Feels unnatural one needs a dummy egress policy in the Modelling objectives in this case.