M
Modular10mo ago
fishbone

Probably a very silly question...

Hi everyone. I am not quite sure where to post this, but I'm trying to dip my toes into the Modular SDK, interfacing with it via Python. ✓ Installed Mojo/Modular SDK on my Ubuntu 20.04 system. ✓ The mojo and modular commands both work. I can also run .mojo files no problem. ✓ I proceeded with the Getting Started in Python guide.
import numpy as np
from modular import engine
from pathlib import Path

session = engine.InferenceSession()
model_path = Path('/mnt/canopy_raid/Models/bert-base-uncased')
model = session.load(model_path)

for tensor in model.input_metadata:
print(f'name: {tensor.name}, shape: {tensor.shape}, dtype: {tensor.dtype}')
import numpy as np
from modular import engine
from pathlib import Path

session = engine.InferenceSession()
model_path = Path('/mnt/canopy_raid/Models/bert-base-uncased')
model = session.load(model_path)

for tensor in model.input_metadata:
print(f'name: {tensor.name}, shape: {tensor.shape}, dtype: {tensor.dtype}')
I get the error:
from modular import engine
ModuleNotFoundError: No module named 'modular'
from modular import engine
ModuleNotFoundError: No module named 'modular'
I'm still a beginner coder, but I know a little about python packages so I figure I'd make a symbolic link between modular and my python dist-packages. sudo ln -s /usr/bin/modular /usr/lib/python3/dist-packages Unsurprisingly, still nothing. What am I missing here?
3 Replies
Jack Clayton
Jack Clayton10mo ago
That's not available yet, click the Mojo button up the top bar there:
No description
fishbone
fishboneOP10mo ago
Okay, that makes me feel a bit better, ha. Thanks. So is the MAX Engine not yet interface-able?
Jack Clayton
Jack Clayton10mo ago
Not just yet, it’s coming this quarter though
Want results from more Discord servers?
Add your server