0

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.

George Vovos
  • 7,563
  • 2
  • 22
  • 45

1 Answers1

1

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

charles gomes
  • 2,145
  • 10
  • 15
  • Thanks for the message Alain I'm using a Cloud Lite account. I'm also using the latest version of the SDK (1.0.38) print(client.version) # 1.0.29 (Not sure why this is not 1.0.38) print(client.version_param) #2020-08-01 (not sure why this is not Oct 19,2020) I deleted all my IBM services (ObjectStorage,WatsonStudio) and created new ones but I still get the same error. I'm using you oprunonwmlv2.py file as is from your repo (I've just hard-coded the space-id) https://github.com/IBMDecisionOptimization/oplrunonwml – George Vovos Nov 16 '20 at 17:20
  • OK, apparently my VS Code was using 1.0.29 , once I updated it to use 1.0.38 it works fine. Thanks again. Just edit your answer to say "update the python SDK" and I'll mark it as accepted – George Vovos Nov 16 '20 at 18:30