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
4 changes: 1 addition & 3 deletions ads/feature_store/common/utils/transformation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ def apply_transformation(
# Execute the function under namespace
execution_namespace = {}
exec(transformation_function, execution_namespace)
transformation_function_caller = execution_namespace.get(
transformation.name
)
transformation_function_caller = execution_namespace.get(transformation.name)
transformed_data = None

transformation_kwargs_dict = json.loads(transformation_kwargs)
Expand Down
9 changes: 7 additions & 2 deletions ads/feature_store/execution_strategy/spark/spark_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,10 @@ def update_feature_definition_features(self, feature_group, target_table):
try:
# Get the output features
output_features = get_features(
self.spark_engine.get_output_columns_from_table_or_dataframe(table_name=target_table), feature_group.id
self.spark_engine.get_output_columns_from_table_or_dataframe(
table_name=target_table
),
feature_group.id,
)
if output_features:
feature_group._with_features(output_features)
Expand All @@ -392,7 +395,9 @@ def update_dataset_features(self, dataset, target_table):
try:
# Get the output features
output_features = get_features(
output_columns=self.spark_engine.get_output_columns_from_table_or_dataframe(table_name=target_table),
output_columns=self.spark_engine.get_output_columns_from_table_or_dataframe(
table_name=target_table
),
parent_id=dataset.id,
entity_type=EntityType.DATASET,
)
Expand Down
4 changes: 1 addition & 3 deletions ads/feature_store/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,7 @@ def create_entity(
"FeatureStore Resource must be created or saved before creating the entity."
)

self.oci_fs_entity = self._build_entity(
name, description, compartment_id
)
self.oci_fs_entity = self._build_entity(name, description, compartment_id)
return self.oci_fs_entity.create()

def delete_entity(self):
Expand Down
7 changes: 4 additions & 3 deletions ads/feature_store/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,14 @@ def create(self, **kwargs) -> "Transformation":
if not self.source_code_function:
raise ValueError("Transformation source code function must be provided.")

if not self.transformation_mode:
raise ValueError("Transformation Mode must be provided.")

if not self.name:
self.name = self._transformation_function_name

if self.name != self._transformation_function_name:
raise ValueError(
"Transformation name and function name must be same."
)
raise ValueError("Transformation name and function name must be same.")

payload = deepcopy(self._spec)
payload.pop("id", None)
Expand Down