Hylke
MModular
•Created by Hylke on 9/22/2024 in #questions
How to define nested dict function
(This is a shortened cross post of my stackoverflow question).
How do I define a function in Mojo where the argument or return value is a nested structure, like a dictionary. But where the exact structure is not known at compile time because, for example, it is read from disk.
For example, how do I type annotate
params
in the function neural_network
to represent a nested dict to keep the model parameters (i.e., a pytree).
Thanks so much!6 replies
MModular
•Created by Hylke on 5/9/2024 in #questions
Mojo test
Did anyone get unit tests working?
I run
mojo test
on the following folder structure:
But it doesn't pick up my tests Total Discovered Tests: 0
.
The test_tensor.🔥 contains a function:
As described in the docs: https://docs.modular.com/mojo/tools/testing
Any suggestions?7 replies