featrixsphere 0.2.2280__py3-none-any.whl → 0.2.3613__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- featrixsphere/__init__.py +1 -1
- featrixsphere/client.py +36 -18
- {featrixsphere-0.2.2280.dist-info → featrixsphere-0.2.3613.dist-info}/METADATA +1 -1
- featrixsphere-0.2.3613.dist-info/RECORD +8 -0
- featrixsphere-0.2.2280.dist-info/RECORD +0 -8
- {featrixsphere-0.2.2280.dist-info → featrixsphere-0.2.3613.dist-info}/WHEEL +0 -0
- {featrixsphere-0.2.2280.dist-info → featrixsphere-0.2.3613.dist-info}/entry_points.txt +0 -0
- {featrixsphere-0.2.2280.dist-info → featrixsphere-0.2.3613.dist-info}/top_level.txt +0 -0
featrixsphere/__init__.py
CHANGED
featrixsphere/client.py
CHANGED
|
@@ -4547,20 +4547,20 @@ class FeatrixSphereClient:
|
|
|
4547
4547
|
if verbose:
|
|
4548
4548
|
print(f"📊 Using provided DataFrame ({len(df)} rows, {len(df.columns)} columns)")
|
|
4549
4549
|
|
|
4550
|
-
# Create temporary
|
|
4551
|
-
temp_file = tempfile.NamedTemporaryFile(mode='
|
|
4550
|
+
# Create temporary parquet file (faster and more efficient than CSV)
|
|
4551
|
+
temp_file = tempfile.NamedTemporaryFile(mode='wb', suffix='.parquet', delete=False)
|
|
4552
4552
|
temp_file_path = temp_file.name
|
|
4553
4553
|
temp_file.close()
|
|
4554
4554
|
|
|
4555
|
-
# Save DataFrame to temp file
|
|
4556
|
-
df.
|
|
4555
|
+
# Save DataFrame to temp parquet file
|
|
4556
|
+
df.to_parquet(temp_file_path, index=False, engine='pyarrow')
|
|
4557
4557
|
|
|
4558
4558
|
if verbose:
|
|
4559
|
-
print(f"📁 Saved to temporary file: {os.path.basename(temp_file_path)}")
|
|
4559
|
+
print(f"📁 Saved to temporary parquet file: {os.path.basename(temp_file_path)}")
|
|
4560
4560
|
print(f"📤 Uploading file directly with training request...")
|
|
4561
4561
|
|
|
4562
4562
|
# Send file in multipart form
|
|
4563
|
-
files = {'file': (os.path.basename(temp_file_path), open(temp_file_path, 'rb'), '
|
|
4563
|
+
files = {'file': (os.path.basename(temp_file_path), open(temp_file_path, 'rb'), 'application/octet-stream')}
|
|
4564
4564
|
|
|
4565
4565
|
elif input_filename:
|
|
4566
4566
|
# If absolute path provided, send file directly
|
|
@@ -4573,8 +4573,17 @@ class FeatrixSphereClient:
|
|
|
4573
4573
|
if verbose:
|
|
4574
4574
|
print(f"📤 Sending file directly from absolute path: {input_filename}")
|
|
4575
4575
|
|
|
4576
|
+
# Determine MIME type based on file extension
|
|
4577
|
+
mime_type = 'application/octet-stream' # Default fallback
|
|
4578
|
+
if input_path.suffix == '.csv':
|
|
4579
|
+
mime_type = 'text/csv'
|
|
4580
|
+
elif input_path.suffix == '.parquet':
|
|
4581
|
+
mime_type = 'application/octet-stream'
|
|
4582
|
+
elif input_path.suffix == '.gz':
|
|
4583
|
+
mime_type = 'application/gzip'
|
|
4584
|
+
|
|
4576
4585
|
# Send file in multipart form
|
|
4577
|
-
files = {'file': (input_path.name, open(input_path, 'rb'),
|
|
4586
|
+
files = {'file': (input_path.name, open(input_path, 'rb'), mime_type)}
|
|
4578
4587
|
else:
|
|
4579
4588
|
# Relative filename - assume it's already on the server
|
|
4580
4589
|
data["input_filename"] = input_filename
|
|
@@ -5165,17 +5174,17 @@ class FeatrixSphereClient:
|
|
|
5165
5174
|
if verbose:
|
|
5166
5175
|
print(f"📊 Using provided DataFrame ({len(df)} rows, {len(df.columns)} columns)")
|
|
5167
5176
|
|
|
5168
|
-
# Create temporary
|
|
5169
|
-
temp_file = tempfile.NamedTemporaryFile(mode='
|
|
5177
|
+
# Create temporary parquet file (faster and more efficient than CSV)
|
|
5178
|
+
temp_file = tempfile.NamedTemporaryFile(mode='wb', suffix='.parquet', delete=False)
|
|
5170
5179
|
temp_file_path = temp_file.name
|
|
5171
5180
|
temp_file.close()
|
|
5172
5181
|
|
|
5173
|
-
# Save DataFrame to temp file
|
|
5174
|
-
df.
|
|
5182
|
+
# Save DataFrame to temp parquet file
|
|
5183
|
+
df.to_parquet(temp_file_path, index=False, engine='pyarrow')
|
|
5175
5184
|
file_path = temp_file_path
|
|
5176
5185
|
|
|
5177
5186
|
if verbose:
|
|
5178
|
-
print(f"📁 Saved to temporary file: {os.path.basename(temp_file_path)}")
|
|
5187
|
+
print(f"📁 Saved to temporary parquet file: {os.path.basename(temp_file_path)}")
|
|
5179
5188
|
|
|
5180
5189
|
try:
|
|
5181
5190
|
# If a custom training file is provided (or we created one from df), use the file upload endpoint
|
|
@@ -5406,17 +5415,17 @@ class FeatrixSphereClient:
|
|
|
5406
5415
|
if verbose:
|
|
5407
5416
|
print(f"📊 Using provided DataFrame ({len(new_data_df)} rows, {len(new_data_df.columns)} columns)")
|
|
5408
5417
|
|
|
5409
|
-
# Create temporary
|
|
5410
|
-
temp_file = tempfile.NamedTemporaryFile(mode='
|
|
5418
|
+
# Create temporary parquet file (faster and more efficient than CSV)
|
|
5419
|
+
temp_file = tempfile.NamedTemporaryFile(mode='wb', suffix='.parquet', delete=False)
|
|
5411
5420
|
temp_file_path = temp_file.name
|
|
5412
5421
|
temp_file.close()
|
|
5413
5422
|
|
|
5414
|
-
# Save DataFrame to temp file
|
|
5415
|
-
new_data_df.
|
|
5423
|
+
# Save DataFrame to temp parquet file
|
|
5424
|
+
new_data_df.to_parquet(temp_file_path, index=False, engine='pyarrow')
|
|
5416
5425
|
file_to_upload = temp_file_path
|
|
5417
5426
|
|
|
5418
5427
|
if verbose:
|
|
5419
|
-
print(f"📁 Saved to temporary file: {os.path.basename(temp_file_path)}")
|
|
5428
|
+
print(f"📁 Saved to temporary parquet file: {os.path.basename(temp_file_path)}")
|
|
5420
5429
|
|
|
5421
5430
|
try:
|
|
5422
5431
|
# Prepare file upload
|
|
@@ -6011,8 +6020,17 @@ class FeatrixSphereClient:
|
|
|
6011
6020
|
print(f"📤 Uploading custom training file: {file_path.name}")
|
|
6012
6021
|
|
|
6013
6022
|
# Prepare the multipart form data
|
|
6023
|
+
# Determine MIME type based on file extension
|
|
6024
|
+
mime_type = 'application/octet-stream' # Default fallback
|
|
6025
|
+
if file_path.suffix == '.csv':
|
|
6026
|
+
mime_type = 'text/csv'
|
|
6027
|
+
elif file_path.suffix == '.parquet':
|
|
6028
|
+
mime_type = 'application/octet-stream' # Parquet MIME type
|
|
6029
|
+
elif file_path.suffix == '.gz':
|
|
6030
|
+
mime_type = 'application/gzip'
|
|
6031
|
+
|
|
6014
6032
|
files = {
|
|
6015
|
-
'file': (file_path.name, open(file_path, 'rb'),
|
|
6033
|
+
'file': (file_path.name, open(file_path, 'rb'), mime_type)
|
|
6016
6034
|
}
|
|
6017
6035
|
|
|
6018
6036
|
data = {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
featrixsphere/__init__.py,sha256=PGw5nesAoGHUrtvevAaFuhNq3Qfgzm7JYrbvMx6bCU4,1888
|
|
2
|
+
featrixsphere/client.py,sha256=TiEZIT1Qmc983CbPljc8__e0jJRnpQ3Lf6SabwrvLlo,415649
|
|
3
|
+
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
4
|
+
featrixsphere-0.2.3613.dist-info/METADATA,sha256=0AlxzTM9nXmXhPka3AUhMhIAgdAMxPhzU0Sy18FXc8E,16232
|
|
5
|
+
featrixsphere-0.2.3613.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
featrixsphere-0.2.3613.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
7
|
+
featrixsphere-0.2.3613.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
8
|
+
featrixsphere-0.2.3613.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
featrixsphere/__init__.py,sha256=1f94O-3V4hG42-5IfPSRDSLuySPvxLXTaLfGnuibzto,1888
|
|
2
|
-
featrixsphere/client.py,sha256=jCf6_zv7DhG6OWv8dyCo8dMs0qm9uFjHlH4uPTfUqDU,414594
|
|
3
|
-
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
4
|
-
featrixsphere-0.2.2280.dist-info/METADATA,sha256=6KTfLXB6DPxNmGoGkzVe6FcecIk4sfIaIhWpcLTAptM,16232
|
|
5
|
-
featrixsphere-0.2.2280.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
featrixsphere-0.2.2280.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
7
|
-
featrixsphere-0.2.2280.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
8
|
-
featrixsphere-0.2.2280.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|