Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workload_size should expect a str, not an object which references value #494

Open
jbrill opened this issue Jan 3, 2024 · 1 comment · May be fixed by #495
Open

workload_size should expect a str, not an object which references value #494

jbrill opened this issue Jan 3, 2024 · 1 comment · May be fixed by #495
Assignees

Comments

@jbrill
Copy link

jbrill commented Jan 3, 2024

https://github.com/databricks/databricks-sdk-py/blame/193c3fbc255262de506b9bb927c87392c2c26720/databricks/sdk/service/serving.py#L1654

When attempting to call with an example:

ServedModelInput(
            model_name=model_name,
            model_version=latest_model_version,
            workload_size="Small",
            scale_to_zero_enabled=True,
            environment_vars={}
        )

We receive:

   1652 if self.name is not None: body['name'] = self.name
   1653 if self.scale_to_zero_enabled is not None: body['scale_to_zero_enabled'] = self.scale_to_zero_enabled
-> 1654 if self.workload_size is not None: body['workload_size'] = self.workload_size.value
   1655 if self.workload_type is not None: body['workload_type'] = self.workload_type.value
   1656 return body

AttributeError: 'str' object has no attribute 'value'
@jbrill jbrill linked a pull request Jan 3, 2024 that will close this issue
@mgyucht
Copy link
Contributor

mgyucht commented Jan 3, 2024

@jbrill can you use ServedModelInputWorkloadSize.SMALL for now?

We plan to make the SDK accept strings for enum values in the coming future.

@mgyucht mgyucht self-assigned this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants