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

Create a version in MDF of PyTorch RNN tutorial model #306

Open
6 tasks
pgleeson opened this issue Aug 3, 2022 · 2 comments
Open
6 tasks

Create a version in MDF of PyTorch RNN tutorial model #306

pgleeson opened this issue Aug 3, 2022 · 2 comments
Assignees

Comments

@pgleeson
Copy link
Member

pgleeson commented Aug 3, 2022

https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html

Possible steps for @Ivy8127:

  • Create a standalone repo with a python script version of the model
  • Add tests/Github actions for training/using the model
  • Start converting parts to MDF, e.g. lineToTensor method (string in, tensor out), the predictor (tensor in, dict out with prediction scores)
  • Try to export the trained PyTorch RNN core to MDF
  • Try connecting this to the other parts to make MDF model with just: string in, prediction out
  • Investigate options to train model when it is in MDF form...
@Ivy8127
Copy link
Contributor

Ivy8127 commented Aug 18, 2022

The lineToTensor function takes in a string input and returns a tensor that can be fed into the RNN. My question is this, how do I think about modeling this function in an MDF way? I'm currently stuck here.

Also trying to get acquainted with some of Parikshit's work here: https://github.com/ModECI/MDF/tree/development/examples/PyTorch

@pgleeson
Copy link
Member Author

@Ivy8127, it seems that supporting strings as parameters will be a bit more involved than expected... Currently the execution engine treats a string parameter as an expression to evaluate (like "a + b"), and will give an error if it can't parse it.

There needs to be something like a dtype attribute on parameters which can state they they can be strings, and treat them differently. I'll try to prototype somethign early next week. For now, try using the standard pytorch->mdf examples to export the core RNN model to MDF and see how that goes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants