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

Don't pass 'default' model #15

Closed
wants to merge 2 commits into from
Closed

Don't pass 'default' model #15

wants to merge 2 commits into from

Conversation

michalwols
Copy link

No description provided.

@@ -136,7 +136,7 @@ def __init__(self, app_id=None, app_secret=None, base_url='https://api.clarifai.
self.api_info = None

def set_model(self, model):
self._model = self._sanitize_param(model, 'default')
self._model = self._sanitize_param(model)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read the current code right, we're already not sending an explicit model param in the default case. self._model is None, and _sanitize_param returns None when it gets None. I think this change isn't necessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right. Either way, we still shouldn't convert the error to 'default'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just letting the unicode error get raised is appropriate.

@michalwols michalwols closed this Jan 6, 2016
@robertwenquan robertwenquan deleted the default-model branch October 20, 2016 10:00
josh-tepper pushed a commit that referenced this pull request Aug 11, 2023
* Added model generator for util lister; bumped version to 0.1.16 from 0.1.15

* added in option to only return models created within app, not all accessible models

* linting

* Linter

* linter
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