Maximilian Franz
Maximilian Franz
Hey @smith120bh and @LeoBelmont, also consider our changes here: https://github.com/modugen/anaStruct We've introduced trapezoidal loads and modal analysis, though not in a pursuit to add in the changes to the anastruct...
Hey again, to be sure, the implementation was from https://github.com/marciosarto, not me. He can also be of help if questions arise :) @smith120bh feel free to pull this into the...
Hey all, thanks for the great advice here. Creating a the object using the classes and writing them to the DB works as expected and writes the data as a...
Something like this works, but obviously doesn't scale if we have mulitple nested models, instead of just the `ComplexHeroField`: ``` def custom_serializer(d): return json.dumps(d, default=lambda v: v.json()) def custom_deserialiser(d): return...
Hey all, after looking at this again, I've been able to resolve it as follows. For our sqlalchemy models we created this PydanticJSONType factory: ```python def pydantic_column_type(pydantic_type): class PydanticJSONType(TypeDecorator, Generic[T]):...
> Hey @MaximilianFranz Would you mind sharing your entire solution, I am quite interested in trying it out, but it is missing some code pieces. What exactly are you missing?...
You can use `jsonable_encode` like such, instead of the `recursive_custom_encoder` ```python from fastapi.encoders import jsonable_encoder ``` also I would start with a simpler model like: ```python class NestedModel(SQLModel): some_value: str...
> Thanks, @MaximilianFranz Let me try. My code is here: https://github.com/Lightning-AI/lightning-hpo/blob/master/lightning_hpo/commands/sweep.py#L36. Trying to store the Sweep distributions. Do you think it would work with the recursion? Missing `parse_obj_as` and `ModelMetaclass`....
> It makes sense that it doesn't work yet. You'll have to use the `ModelMetaclass` as is done in my snippet above for the `isinstance` check. Also the import for...
> Hey @MaximilianFranz, I updated the code with your inputs, but it is still failing. I pushed the updated code. > > ```python > File "/Users/thomas/Documents/GitHub/LAI-lightning-hpo-App/lightning_hpo/components/servers/db/server.py", line 42, in insert_sweep...