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

fix(tracing): respect mode in R forward function #1253

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

Conversation

sebffischer
Copy link
Collaborator

@sebffischer sebffischer commented Jan 23, 2025

I realized that because TorchScript is statically typed, we would need to infer the types for the forward method that selects trainforward or evalforward depending on the mode (if we want to register this method in the C++ ScriptModule).
While I still think this is the cleaner approach, I don't immediately now how to do this, so I would defer this to a later point. For now this also works I think.

Resolves Issue #1252

I realized that because TorchScript is statically typed
we would need to infer the types for the forward method
that selects trainforward or evalforward depending on the mode.

We can do this later, but for now I think this fix is also okay.

Resolves Issue mlverse#1252
@sebffischer
Copy link
Collaborator Author

@dfalbel once again I need the 'lantern' tag

@dfalbel dfalbel added the lantern Use this label if your PR affects lantern so it's built in the CI label Jan 23, 2025
@dfalbel
Copy link
Member

dfalbel commented Jan 23, 2025

Just added the lantern tag. I also gave you some additional roles in the repository, so you should be able to mark PR labels now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lantern Use this label if your PR affects lantern so it's built in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants