Update configuration to use dacite/pyserde
Update the configuration system to use type checking and something like dacite or pyserde
Context
Easier configuration, and included type checking to help catch bugs/issues
Possible Implementation
Dactie or pyserde are both nice options.
@jacobbieker could i work on this?
Yeah! I'd recommend starting with just one of the issues you've commented on, and can go from there as you finish them?
@jacobbieker can I take this up? also I had a quick look, is the following close to what you are looking for?
replace ->
# Some configs from graphcast:
_spatial_features_kwargs = dict(
add_node_positions=False,
add_node_latitude=True,
add_node_longitude=True,
add_relative_positions=True,
relative_longitude_local_coordinates=True,
relative_latitude_local_coordinates=True,
)
with ->
from dataclasses import dataclass
from dacite import from_dict
@dataclass
class SpatialFeaturesConfig:
add_node_positions: bool = False
add_node_latitude: bool = True
add_node_longitude: bool = True
add_relative_positions: bool = True
relative_longitude_local_coordinates: bool = True
relative_latitude_local_coordinates: bool = True
config_dict = {
"add_node_positions": False,
"add_node_latitude": True,
"add_node_longitude": True,
"add_relative_positions": True,
"relative_longitude_local_coordinates": True,
"relative_latitude_local_coordinates": True,
}
_spatial_features_kwargs = from_dict(data_class=SpatialFeaturesConfig, data=config_dict)
Hey, yes! That's pretty much exactly what I was thinking. We just want to get all the configuration to be like that.
I need help with the failing pipeline. ruff is failing for files that I didn't touch or commit :(
@ACSE-vg822 are you still working on this
@lambaaryan011 Hey! I was planning to finish it by this weekend. But I'd really appreciate if you can do it because I am totally occupied otherwise :(
@ACSE-vg822 OK let me see. The issue
@ACSE-vg822 i try this issue but there i something that i not under my shade so can you tell other to do .
Hi @jacobbieker Could you please assign this issue. to me.? Happy to contribute. Thank you!
Sure!