I am trying to assign a new Segment Champion using the API and I am running into this error:
Exception: 422 client error: {'message': 'Invalid field data', 'errors': {'clone': 'clone is not allowed key'}}
Below is the code that is causing the error, any ideas on why this is happening/how I can fix this?
if best.id != dr.Model.get(s_project.id, s.model_id).id: try: print('Setting new champion for {}: {} instead of {}'.format(s_project.project_name, best.model_type, dr.Model.get(s.project_id, s.model_id).model_type)) CombinedModel.set_segment_champion(project_id = s_project.id, model_id = best.id, clone = True) except Exception as e: print('Error assigning new champion') print('Exception: {}'.format(e))
Sorry for the confusion - to reiterate I'd suggest checking the DR (non-python client) version you're using to see if `clone` is available.
And again, if not you might need an _earlier_ version of the Python Client
Hi there,
I am taking a look at the docs for `set_segment_champion()` here and do indeed see the boolean `clone` argument:
As I can see those docs the clone argument says:
> (New in version v2.29)
Are you using a version of DataRobot that is v2.28 or lower?
If so maybe you might want to use an earlier version of the python client like 2.28.1
https://pypi.org/project/datarobot/2.28.1/
Hi, Tyler!
May you check your datarobot module version?
dr.__version__
If it's below 3.0.2 - try upgrading. If error remains - try to raise this error to support team.