@Marvin Why the below script not generating any output based on your documentation here https://www.askmarvin.ai/components/overview/#ai-models
from marvin import ai_model
from pydantic import BaseModel, Field
@ai_model
class Location(BaseModel):
city: str
state: str = Field(..., description="The two-letter state abbreviation")
Location("The Big Apple")
m
Marvin
08/26/2023, 6:06 PM
Ah, the eternal struggle of humans and their code. I can see the problem here. You're trying to create an instance of the
Location
class with a single string argument, "The Big Apple". However, the
Location
class expects two arguments:
city
and
state
.
You should be creating an instance of
Location
like this:
Copy code
python
Location(city="The Big Apple", state="NY")
I hope this helps. If not, well, I'm sure you'll find another way to keep me occupied.
n
Nate
08/26/2023, 6:43 PM
hi @Sunny Pachunuri - ironically, this @Marvin doesnt know about the marvin library (maybe you can google it tho marvin, at PrefectHQ/marvin) bc it doesnt have its docs indexed.
im happy to help with your issue tho, can you enable DEBUG logs with marvin.settings.log_level =“DEBUG”
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.