Skip to content

fix: remote exception deserialization#1067

Open
badayvedat wants to merge 1 commit into
mainfrom
vedat/fix-remote-exception-deserialization
Open

fix: remote exception deserialization#1067
badayvedat wants to merge 1 commit into
mainfrom
vedat/fix-remote-exception-deserialization

Conversation

@badayvedat
Copy link
Copy Markdown
Contributor

fix CLI output for remote exceptions whose classes are not importable locally.

Problem

When isolate cannot deserialize a remote exception, it raises ExceptionDeserializationError. That error preserves original_traceback.

The traceback object has the remote frames, but not the final exception line:

huggingface_hub.errors.LocalEntryNotFoundError: error

That line only exists in SerializedObject.stringized_traceback.

sdk.py is the last place where both values are available at the same time:

  • ExceptionDeserializationError.original_traceback, raised by isolate
  • SerializedObject.stringized_traceback, still available on the proto being converted

After from_grpc(message.return_value) raises, the proto is no longer available to the API or CLI layers. If the SDK lets isolate’s error pass through unchanged, the CLI can still render the remote frames,
but it cannot recover the remote exception type/message. It would have to label the traceback as generic Exception.

So the SDK wraps only this error case and carries stringized_traceback forward in the exception chain.

@badayvedat badayvedat force-pushed the vedat/fix-remote-exception-deserialization branch from c4b4781 to 1af584d Compare June 4, 2026 16:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1af584d053

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread projects/fal/src/fal/cli/main.py Outdated
Comment thread projects/fal/src/fal/sdk.py Outdated
Comment thread projects/fal/src/fal/api/api.py Outdated
@badayvedat badayvedat force-pushed the vedat/fix-remote-exception-deserialization branch from 1af584d to 6003b94 Compare June 4, 2026 16:33
@badayvedat
Copy link
Copy Markdown
Contributor Author

badayvedat commented Jun 4, 2026

@efiop since we import a type introduced in latest version of isolate, we also need to update isolate version bounds too? do you prefer having it in the same PR or another one

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6003b94a66

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread projects/fal/src/fal/sdk.py Outdated
Comment thread projects/fal/src/fal/cli/main.py Outdated
@badayvedat badayvedat force-pushed the vedat/fix-remote-exception-deserialization branch from 6003b94 to e13be51 Compare June 4, 2026 17:05
@badayvedat
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e13be51f58

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread projects/fal/pyproject.toml
Comment thread projects/fal/src/fal/cli/main.py
@badayvedat badayvedat requested a review from efiop June 4, 2026 17:24
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 this pull request may close these issues.

1 participant