Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class CsvWriter:
def _to_csv_format(val: any) -> str:
if isinstance(val, bool):
return str(val).lower()
if isinstance(val, dict):
return json.dumps(val)
if str(val) == 'True' or str(val) == 'False':
return str(val).lower()
if str(val).startswith('{') and str(val).endswith('}'):
Expand Down
16 changes: 0 additions & 16 deletions CosmoTech_Acceleration_Library/Modelops/core/utils/model_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,3 @@ def build_graph_version_name(graph_name: str, version: int) -> str:
@staticmethod
def build_graph_key_pattern(graph_name: str) -> str:
return graph_name + ":*"

@staticmethod
def unjsonify(value: dict) -> dict:
"""
Unjsonify transform json strings to python objects
:param value a dict
:return: a dict with unjsonify values
"""
for k, v in value.items():
if isinstance(v, str):
try:
value[k] = json.loads(v)
logger.debug(f" new value => {value[k]}")
except ValueError as e:
logger.debug(f"{v} is not a jsonString, use the raw value")
return value
2 changes: 1 addition & 1 deletion CosmoTech_Acceleration_Library/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Cosmo Tech corporation.
# Licensed under the MIT license.

__version__ = '0.2.17'
__version__ = '0.2.18'