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

Failed to reproduce the PytorchModel examples #162

Closed
nychiang opened this issue Nov 6, 2024 · 6 comments · Fixed by #163
Closed

Failed to reproduce the PytorchModel examples #162

nychiang opened this issue Nov 6, 2024 · 6 comments · Fixed by #163

Comments

@nychiang
Copy link

nychiang commented Nov 6, 2024

It seems that the function PytorchModel is not implemented (see here).
Are there plans to implement it? Or how we can reproduce the example?

@cnpetra
@prata74

@odow
Copy link
Collaborator

odow commented Nov 6, 2024

Ah, the docs are missing the instruction

import PythonCall

The code is here:
https://github.com/lanl-ansi/MathOptAI.jl/blob/main/ext/MathOptAIPythonCallExt.jl

It gets loaded in the CI tests because I have

import PythonCall

and it gets loaded in the documentation build because I have
import PythonCall

I need to clarify this in the docs. Or perhaps I should just add PythonCall as a strict dependency.

Thoughts @Robbybp? I initially wanted to keep the deps as light as possible, but it seems like PythonCall might be a pretty common use case (much more than say, Lux or Flux).

@odow
Copy link
Collaborator

odow commented Nov 6, 2024

I just made a PR to improve the documentation: #163

@Robbybp
Copy link
Collaborator

Robbybp commented Nov 6, 2024

I say keep the dependencies light and clarify the docs

@odow
Copy link
Collaborator

odow commented Nov 7, 2024

As an audit: the other extensions are okay, because users explicitly need to import them to build the ML (you can't load a Flux model without using Flux). PythonCall is the only exception because we need PythonCall, but the user doesn't need it.

@odow odow closed this as completed in #163 Nov 7, 2024
@odow
Copy link
Collaborator

odow commented Nov 7, 2024

Thanks for opening the issue @nychiang. Don't hesitate if you have other questions 😄

@odow
Copy link
Collaborator

odow commented Nov 7, 2024

Release docs are now updated:
https://lanl-ansi.github.io/MathOptAI.jl/stable/api/#PytorchModel

image

https://lanl-ansi.github.io/MathOptAI.jl/stable/tutorials/pytorch/

image

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 a pull request may close this issue.

3 participants