Skip to content

Commit

Permalink
[Python] Fix wheel building; update version to 1.0.0b1 (#362)
Browse files Browse the repository at this point in the history
* Fix cibuildwheel network proxy.

Signed-off-by: Xiong HuaiDong <[email protected]>

* Fix dependent urllib3 version.

Signed-off-by: Xiong HuaiDong <[email protected]>

* Fix callback debug prints.

Signed-off-by: Xiong HuaiDong <[email protected]>

* Update LakeSoul wheel version to 1.0.0b1 for ray dataset.

Signed-off-by: Xiong HuaiDong <[email protected]>

---------

Signed-off-by: Xiong HuaiDong <[email protected]>
Co-authored-by: Xiong HuaiDong <[email protected]>
  • Loading branch information
codingfun2022 and Xiong HuaiDong authored Nov 7, 2023
1 parent f933d5c commit b16c6ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "lakesoul"
version = "1.0.0b0"
version = "1.0.0b1"
authors = [
{ name="LakeSoul Team", email="[email protected]" },
]
Expand Down Expand Up @@ -41,12 +41,13 @@ include = ["lakesoul*"]
[project.optional-dependencies]
torch = ["torch>=1.11"]
pandas = ["pandas>=1.4"]
datasets = ["datasets>=2.14"]
datasets = ["datasets>=2.14", "urllib3<2,>=1.21.1"]
ray = ["ray>=2.7"]
all = [
"torch>=1.11",
"pandas>=1.4",
"datasets>=2.14",
"urllib3<2,>=1.21.1",
"ray>=2.7",
]

Expand Down
4 changes: 2 additions & 2 deletions python/docker_build_all_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _patch_cibuildwheel(self, dir_path):
file_path = os.path.join(site_path, 'cibuildwheel', 'oci_container.py')
with io.open(file_path) as fin:
text = fin.read()
pattern = r'^( +network_args = \["--network=host"])$\n\n( +)(shell_args = \[)'
pattern = r'^( +network_args = \["--network=host"])$\n\n( +)(.+)'
match = re.search(pattern, text, re.M)
if match is None:
return
Expand Down Expand Up @@ -73,7 +73,7 @@ def context():
py_path = os.path.join(dir_path, 'bin', 'python')
args = [py_path, '-m', 'pip', 'install', '--upgrade', 'pip']
subprocess.check_call(args)
args = [py_path, '-m', 'pip', 'install', 'cibuildwheel~=2.15']
args = [py_path, '-m', 'pip', 'install', 'cibuildwheel==2.16.2']
subprocess.check_call(args)
self._patch_cibuildwheel(dir_path)
yield dir_path
Expand Down
7 changes: 3 additions & 4 deletions python/lakesoul/metadata/native_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self):
self._bool = False

def callback(bool, msg):
print("create connection callback: status={} msg={}".format(bool, msg.decode("utf-8")))
#print("create connection callback: status={} msg={}".format(bool, msg.decode("utf-8")))
if not bool:
message = "fail to initialize lakesoul.metadata.native_client.NativeMetadataClient"
raise RuntimeError(message)
Expand Down Expand Up @@ -89,12 +89,11 @@ def execute_query(self, query_type, params):
joined_params = PARAM_DELIM.join(params).encode("utf-8")

def execute_query_callback(len, msg):
print("execute_query query_type={} callback: len={} msg={}".format(query_type, len, msg.decode("utf-8")))
#print("execute_query query_type={} callback: len={} msg={}".format(query_type, len, msg.decode("utf-8")))
self._query_result_len = len

def export_bytes_result_callback(bool, msg):
print(
"export_bytes_result callback: bool={} msg={}".format(query_type, bool, msg.decode("utf-8")))
#print("export_bytes_result callback: bool={} msg={}".format(query_type, bool, msg.decode("utf-8")))
self._bool = bool

with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
Expand Down
2 changes: 1 addition & 1 deletion python/lakesoul/metadata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,5 @@ def to_arrow_schema(schema_json_str, exclude_columns=None):
if field['name'] in exclude_columns:
continue
arrow_fields.append(to_arrow_field(field))
print(arrow_fields)
#print(arrow_fields)
return pyarrow.schema(arrow_fields)

0 comments on commit b16c6ff

Please sign in to comment.