Skip to content

Conversation

@patricklundquist
Copy link
Contributor

When uploading a model, the get_model_version_proto function in clarifai/runners/models/model_builder.py gathers method signatures to include in the model version protobuf.

For older, "proto-style" methods, the signature is intentionally set to None. This None value was being passed to the resources_pb2.ModelVersion constructor, which expects a MethodSignature object, resulting in a TypeError.

This change filters out any None values from the list of signatures before they are used, ensuring that only valid MethodSignature objects are passed to the protobuf constructor.

When uploading a model, the `get_model_version_proto` function in `clarifai/runners/models/model_builder.py` gathers method signatures to include in the model version protobuf.

For older, "proto-style" methods, the signature is intentionally set to `None`. This `None` value was being passed to the `resources_pb2.ModelVersion` constructor, which expects a `MethodSignature` object, resulting in a `TypeError`.

This change filters out any `None` values from the list of signatures before they are used, ensuring that only valid `MethodSignature` objects are passed to the protobuf constructor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants