M
Modular•3mo ago
Kevin Thomas

mojonet

PyTorch Neural Network wrapper to help transition existing projects into the Mojo programming language. https://github.com/mytechnotalent/mojonet #🔥mojo
GitHub
GitHub - mytechnotalent/mojonet: PyTorch Neural Network wrapper to ...
PyTorch Neural Network wrapper to help transition existing projects into the Mojo programming language. - mytechnotalent/mojonet
No description
10 Replies
Martin Dudek
Martin Dudek•3mo ago
Interesting. So it's basically a Pytorch wrapper?
...
var torch = Python.import_module("torch")
...
...
var torch = Python.import_module("torch")
...
Have you done any benchmark tests, comparing it to using Pytorch directly? By the way, there is https://discord.com/channels/1087530497313357884/1238547362012729355 pure Mojo 😉
Kevin Thomas
Kevin Thomas•3mo ago
Oh thank you. I have not I wanted to contribute what I could to get those who use PyTorch and easy way to integrate their existing projects in Mojo. @Martin Dudek I would love if you had the time to do a PR for the next release to add in benchmarking functionality and unittests if you had an opportunity being you are more senior in Mojo as this would help advance exsiting AI Devs who work with PyTorch to consider the Mojo platform.
Serg Gini
Serg Gini•3mo ago
Isn't Mojo's bindings should be to C++ libtorch library? for the speed..
Kevin Thomas
Kevin Thomas•3mo ago
@Serg Gini the point of this repo is for AI Developers who are comfortable with PyTorch to have a quick framework to get their project working with the Mojo platform. The point of this repo is wider adoption to Mojo as there are a large number of AI Developers I have introduced to Mojo and they are extremely hesitant without some helper framework to get them started and that is what I am trying to do to advance the Mojo ecosystem.
ModularBot
ModularBot•3mo ago
Congrats @Kevin Thomas, you just advanced to level 1!
Martin Dudek
Martin Dudek•3mo ago
Sorry, but I even haven't had the chance to set this up for my own projects. I've been juggling too many projects at once, and don't have the expertise yet to establish meaningful benchmark tests yet.
Kevin Thomas
Kevin Thomas•3mo ago
No problem @Martin Dudek appreciate all the work you all do! I attempted to write unittests however I was unable to import my mojo package properly from the tests folder. I tried to follow other examples but was unsuccessful. I was successful in creating some unittest @Chris Lattner and will push them up tomorrow. I am hoping the larger Python Community who uses PyTorch is excited to try this out.
Kevin Thomas
Kevin Thomas•3mo ago
Attempted to use mps however it crashes. I created a detailed bug report as I am trying to get this PyTorch wrapper to work with cuda and mps to make it more powerful. https://github.com/modularml/mojo/issues/3092
GitHub
[BUG] crash when attempting to use MAC mps when wrapping PyTorch · ...
Bug description When running train.mojo, we get the following crash. Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the releva...
Kevin Thomas
Kevin Thomas•3mo ago
@Martin Dudek I am trying to use mps which is MAC's cuda alternative in my PyTorch wrapper. Are these capabailities not implemented yet in Mojo? I created a bug for this reason and wanted to better understand. Thank you for your time!
Martin Dudek
Martin Dudek•3mo ago
Mojo does not run on GPU yet, how the situation exactly is when using Python integration, let's see what response you get on your bug report.
Want results from more Discord servers?
Add your server