Refactoring cxg utility classes in preparation for CXG conversion tooling (#1739)

This commit is contained in:
maniarathi
2020-08-14 16:51:13 -07:00
committed by GitHub
parent b034055c35
commit 508889f74b
23 changed files with 607 additions and 177 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
import os
import json
import logging
from server.common.utils import dtype_to_schema
from server.common.utils.type_conversion_utils import get_schema_type_hint_from_dtype
from server.common.errors import DatasetAccessError, ConfigurationError
from server.common.utils import path_join
from server.common.utils.utils import path_join
from server.common.constants import Axis
from server.data_common.data_adaptor import DataAdaptor
from server.data_common.fbs.matrix import encode_matrix_fbs
@@ -389,7 +389,7 @@ class CxgAdaptor(DataAdaptor):
if schema["type"] == "categorical" and "categories" in type_hint:
schema["categories"] = type_hint["categories"]
else:
schema.update(dtype_to_schema(attr.dtype))
schema.update(get_schema_type_hint_from_dtype(attr.dtype))
cols.append(schema)
annotations[ax] = dict(columns=cols)