Azure ML local Deployment: TypeError: 'NoneType' object is not subscriptable
I made a script to automatically deploy Azure Models using the python SDK. I want the Data Scientists in my team to easily have their models tested locally and deploy in the cloud afterwards. I use Model.deploy with a custom configuration which looks like this:
inference_config = InferenceConfig(source_directory=params['source_directory'], entry_script='score.py', environment=environment)
When I run the script in the cloud it is working perfectly, but when I run the script locally I get the following error:
Traceback (most recent call last): File "/deploy_script.py", line 14, in <module> test_deploy.test_service(service, folder, params['service_name'], delete_service_after_test=False) File "\testing_deployment.py", line 20, in test_service result = service.run(input_json) File "\azureml\core\webservice\local.py", line 72, in decorated return func(self, *args, **kwargs) File "\azureml\core\webservice\local.py", line 429, in run cleanup_on_failure=False, score_url=self.scoring_uri) File "\azureml\core\webservice\local.py", line 442, in scoring_uri overrideScorePath = self._container_override_config["scorePath"] TypeError: 'NoneType' object is not subscriptable
It seems like there is a failure when _container_override_config is accessed because it is None.
Does anyone have an idea why it is not working for this local configuration, but it is working for the cloud-based solution?