-
Notifications
You must be signed in to change notification settings - Fork 40
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
[MOD-3614]: pyright _container_io_manager #2179
[MOD-3614]: pyright _container_io_manager #2179
Conversation
…tions-cause-infinite-retry-loops
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.
Nice! Some minor comments
modal/_container_io_manager.py
Outdated
@@ -296,7 +297,7 @@ def _init(self, container_args: api_pb2.ContainerArguments, client: _Client): | |||
self._fetching_inputs = True | |||
|
|||
self._client = client | |||
assert isinstance(self._client, _Client) | |||
# assert isinstance(self._client, _Client) |
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.
Intentional?
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.
No 😄
try: | ||
return self.serialize(exc) | ||
except Exception as serialization_exc: | ||
logger.info(f"Failed to serialize exception {exc}: {serialization_exc}") | ||
# We can't always serialize exceptions. |
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.
Might want to keep the logging here, and in the serialization error print out type(exc)
as well since the stringification of many exceptions is an empty string, e.g.:
>>> str(KeyboardInterrupt())
''
Include
_container_io_manager
in pyright typing checks