Skip to content

expose runner itself with context manager #1069

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bobyangyf
Copy link
Contributor

@bobyangyf bobyangyf commented May 22, 2025

Summary:
Right now, when we enter context after get_fb_runner, we are using the existing definition in Runner which causes type erasure to the super type Runner.
While this is fine for most cases, we lose the ability to access the apis in sub classes.

Here, we expose the self type instead to prevent erasing types

Reviewed By: kiukchung

Differential Revision: D72677312

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 22, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72677312

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72677312

bobyangyf added a commit to bobyangyf/torchx that referenced this pull request May 28, 2025
Summary: Pull Request resolved: pytorch#1069

Reviewed By: lgarg26, kiukchung

Differential Revision: D72677312
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72677312

bobyangyf added a commit to bobyangyf/torchx that referenced this pull request Jun 2, 2025
Summary: Pull Request resolved: pytorch#1069

Reviewed By: lgarg26, kiukchung

Differential Revision: D72677312
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72677312

bobyangyf added a commit to bobyangyf/torchx that referenced this pull request Jun 2, 2025
Summary: Pull Request resolved: pytorch#1069

Reviewed By: lgarg26, kiukchung

Differential Revision: D72677312
Summary: Pull Request resolved: pytorch#1069

Reviewed By: lgarg26, kiukchung

Differential Revision: D72677312
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72677312

@facebook-github-bot
Copy link
Contributor

@bobyangyf has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@bobyangyf bobyangyf changed the title expose fbrunner itself with context manager expose runner itself with context manager Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants