Search code examples
ibm-cloudibm-watsonwatson-studio

IBM Watson Studio API suddenly started throwing an error when trying to upload a model


I'm using the latest ibm_watson_machine_learning SDK (python)

Until a few days/weeks ago my code was working fine but now I get an error when running

 client.repository.store_model(model='./model.tar.gz', meta_props=model_metadata)

Here is some sample code: https://github.com/IBMDecisionOptimization/oplrunonwml

Exception has occurred: IndexError
list index out of range
  File "C:\Temp\oplrunonwml\oprunonwmlv2.py", line 126, in main
    model_details = client.repository.store_model(model='./model.tar.gz', meta_props=model_metadata)
  File "C:\Temp\oplrunonwml\oprunonwmlv2.py", line 215, in <module>
    main(sys.argv[1:])

I get this error while using various different models (OPL/Cplex/Docplex) and they all fail with this error.

What's strange, is that the model is uploaded correctly in the Deployment Space and I can use it without problems in deployment/jobs on the UI or on other scripts.

The code was working fine without any changes a few weeks ago so I assume something's changed on the API side

Update:
I'm using a Cloud Lite account. I'm also using the latest version of the SDK

client = APIClient(wml_credentials)
print(client.version) # 1.0.29
print(client.version_param) #2020-08-01

I deleted all my IBM services (ObjectStorage,WatsonStudio) and created new ones but I still get the same error.


Solution

  • I would suspect the WML v2 instances deployement. *** With V2 plan, user need to use updated Python SDK (ibm-watson-machine-learning 1.0.38) ***

    If you had a v1 iunstance before and according to your plan, it might have been keeping working withoutmirgation for a while.

    May be you reached the end of this compatibility period.

    Can you clarify your plan type?

    See https://medium.com/@AlainChabrier/migrate-your-python-code-for-do-in-wml-v2-instances-710025796f7

    Alain