| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -39,6 +39,7 @@ | |
|
|
||
| import proto | ||
|
|
||
| from google.api_core import retry | ||
| from google.api_core import operation | ||
| from google.auth import credentials as auth_credentials | ||
| from google.cloud.aiplatform import initializer | ||
| Expand All | @@ -48,6 +49,9 @@ | |
|
|
||
| logging.basicConfig(level=logging.INFO, stream=sys.stdout) | ||
|
|
||
| # This is the default retry callback to be used with get methods. | ||
| _DEFAULT_RETRY = retry.Retry() | ||
|
|
||
|
|
||
| class Logger: | ||
| """Logging wrapper class with high level helper methods.""" | ||
| Expand Down Expand Up | @@ -532,7 +536,9 @@ def _get_gca_resource(self, resource_name: str) -> proto.Message: | |
| location=self.location, | ||
| ) | ||
|
|
||
| return getattr(self.api_client, self._getter_method)(name=resource_name) | ||
| return getattr(self.api_client, self._getter_method)( | ||
|
Comment thread
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityHow about delete and list methods?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe purpose of the PR is to address intermittent failure during polling and the goal is to scope to that issue. We can follow up on list and delete. delete will take additional care as the request to delete may get through to the service but we may not receive a response and retrying delete will throw an exception.
Sorry, something went wrong.
All reactions
|
||
| name=resource_name, retry=_DEFAULT_RETRY | ||
| ) | ||
|
|
||
| def _sync_gca_resource(self): | ||
| """Sync GAPIC service representation of client class resource.""" | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIIUC gapic_v1.method.DEFAULT is used when no retry is provided (https://github.com/googleapis/python-aiplatform/search?q=retry%3D). I wonder if there is any difference between _DEFAULT_RETRY and gapic_v1.method.DEFAULT?
If there is no difference, I think we need a more aggressive _DEFAULT_RETRY to fix the current problem.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitygapic_v1.method.DEFAULT is a sentinel value that is used to set the default retry passed into the constructor of the Gapic callable.
See usage here: https://github.com/googleapis/python-api-core/blob/main/google/api_core/gapic_v1/method.py#L125
The default retry is None: https://github.com/googleapis/python-api-core/blob/main/google/api_core/gapic_v1/method.py#L147
cc: @ivanmkc
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.