Skip to content

Commit ef574f2

Browse files
committed
add to_dict
1 parent bd04bf1 commit ef574f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

python/hsfs/core/online_config.py

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def from_response_json(cls, json_dict: Dict[str, Any]) -> "OnlineConfig":
3636
json_decamelized = humps.decamelize(json_dict)
3737
return cls(**json_decamelized)
3838

39+
def to_dict(self):
40+
return {
41+
"onlineConfig": self._online_comments,
42+
}
43+
3944
@property
4045
def online_comments(self):
4146
return self._online_comments

python/hsfs/feature_group.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3435,7 +3435,7 @@ def to_dict(self) -> Dict[str, Any]:
34353435
"notificationTopicName": self.notification_topic_name,
34363436
"deprecated": self.deprecated,
34373437
"transformationFunctions": self._transformation_functions,
3438-
"onlineConfig": self._online_config,
3438+
"onlineConfig": self._online_config.to_dict(),
34393439
}
34403440
if self.embedding_index:
34413441
fg_meta_dict["embeddingIndex"] = self.embedding_index.to_dict()
@@ -4067,7 +4067,7 @@ def to_dict(self) -> Dict[str, Any]:
40674067
"topicName": self.topic_name,
40684068
"notificationTopicName": self.notification_topic_name,
40694069
"deprecated": self.deprecated,
4070-
"onlineConfig": self._online_config,
4070+
"onlineConfig": self._online_config.to_dict(),
40714071
}
40724072
if self.embedding_index:
40734073
fg_meta_dict["embeddingIndex"] = self.embedding_index

0 commit comments

Comments
 (0)