Closed federico-carrara closed 2 months ago
Ping me when you have the deserializer in the PR, so we can review it!
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.23%. Comparing base (
427fa26
) to head (5264466
). Report is 6 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
nm_model.py
andlikelihood_model.py
).Changes Made
array_to_json()
.list_to_numpy()
,list_to_torch()
.For further discussion
NOTE1: why deserializer takes in a list? Because in our use case we need deserializers to move config files usually stored as dicts into pydantic models. But, such dicts are often the result of loading config file mainly stored as
json
,pkl
, oryml
. The loader for these file types automatically deserialize strings into lists. That's why what is left to do for us is to move lists into arrays or tensors.NOTE2: why 2 different deserializers? Because in some cases we want to deserialize list to torch tensor and in some other cases we prefer numpy arrays.
After discussing with @jdeschamps we realized that some large arrays should not be part of configs (e.g.,
signal
,observation
innm_model.py
). Therefore, I left TODOs to remind about discussing this for future refactoring.Please ensure your PR meets the following requirements: