Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization bug due to version incompatibility between azure-core and msrest #763

Merged
merged 15 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from 14 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
6 changes: 6 additions & 0 deletions feathr_project/feathr/udf/_preprocessing_pyudf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def build_anchor_preprocessing_metadata(anchor_list: List[FeatureAnchor], local_
continue
preprocessing_func = anchor.source.preprocessing
if preprocessing_func:
print("Preprocessing function defined")
jainr marked this conversation as resolved.
Show resolved Hide resolved
print(anchor.source.preprocessing.name)
_PreprocessingPyudfManager.persist_pyspark_udf_to_file(preprocessing_func, local_workspace_dir)
feature_names = [feature.name for feature in anchor.features]
features_with_preprocessing = features_with_preprocessing + feature_names
Expand Down Expand Up @@ -109,9 +111,13 @@ def persist_pyspark_udf_to_file(user_func, local_workspace_dir):
however if we retrieve features from registry, the current implementation is to use plain strings to store the function body. In that case, the user_fuc will be string.
"""
if isinstance(user_func, str):
print("In If loop -> user function name is : " + user_func)
udf_source_code = [user_func]
else:
print("In else loop -> user function name is : " + user_func)
udf_source_code = inspect.getsourcelines(user_func)[0]
print("UDF SOURCE -----> " + udf_source_code)

lines = []
# Some basic imports will be provided
lines = lines + PROVIDED_IMPORTS
Expand Down
4 changes: 4 additions & 0 deletions feathr_project/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
# https://github.com/Azure/azure-sdk-for-python/pull/22891
# using a version lower than that to workaround this issue.
"azure-core<=1.22.1",
# azure-core 1.22.1 is dependent on msrest==0.6.21, if an environment(AML) has a different version of azure-core (say 1.24.0),
# it brings a different version of msrest(0.7.0) which is incompatible with azure-core==1.22.1. Hence we need to pin it.
# See this for more details: https://github.com/Azure/azure-sdk-for-python/issues/24765
"msrest<=0.6.21",
"typing_extensions>=4.2.0"
],
tests_require=[ # TODO: This has been depricated
Expand Down