featrixsphere 0.2.1231__py3-none-any.whl → 0.2.1232__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 +27 -0
- {featrixsphere-0.2.1231.dist-info → featrixsphere-0.2.1232.dist-info}/METADATA +1 -1
- featrixsphere-0.2.1232.dist-info/RECORD +9 -0
- featrixsphere-0.2.1231.dist-info/RECORD +0 -9
- {featrixsphere-0.2.1231.dist-info → featrixsphere-0.2.1232.dist-info}/WHEEL +0 -0
- {featrixsphere-0.2.1231.dist-info → featrixsphere-0.2.1232.dist-info}/entry_points.txt +0 -0
- {featrixsphere-0.2.1231.dist-info → featrixsphere-0.2.1232.dist-info}/top_level.txt +0 -0
featrixsphere/__init__.py
CHANGED
featrixsphere/client.py
CHANGED
|
@@ -1727,6 +1727,33 @@ class FeatrixSphereClient:
|
|
|
1727
1727
|
# File Upload
|
|
1728
1728
|
# =========================================================================
|
|
1729
1729
|
|
|
1730
|
+
def upload_file(self, file_path: str) -> str:
|
|
1731
|
+
"""
|
|
1732
|
+
Upload a file to the server without creating a session.
|
|
1733
|
+
Returns the filename that can be used in training requests.
|
|
1734
|
+
|
|
1735
|
+
Args:
|
|
1736
|
+
file_path: Path to the file to upload
|
|
1737
|
+
|
|
1738
|
+
Returns:
|
|
1739
|
+
Filename (relative path) that can be used in training requests
|
|
1740
|
+
"""
|
|
1741
|
+
from pathlib import Path as PathLib
|
|
1742
|
+
file_path_obj = PathLib(file_path)
|
|
1743
|
+
if not file_path_obj.exists():
|
|
1744
|
+
raise FileNotFoundError(f"File not found: {file_path}")
|
|
1745
|
+
|
|
1746
|
+
with open(file_path_obj, 'rb') as f:
|
|
1747
|
+
files = {'file': (file_path_obj.name, f, 'text/csv' if file_path_obj.suffix == '.csv' else 'application/gzip')}
|
|
1748
|
+
response = self._make_request("POST", "/compute/upload_file", files=files)
|
|
1749
|
+
|
|
1750
|
+
response_data = response.json()
|
|
1751
|
+
filename = response_data.get('filename')
|
|
1752
|
+
if not filename:
|
|
1753
|
+
raise ValueError("Server did not return filename in upload response")
|
|
1754
|
+
|
|
1755
|
+
return filename
|
|
1756
|
+
|
|
1730
1757
|
def upload_file_and_create_session(self, file_path: Path, session_name_prefix: str = None, name: str = None, webhooks: Dict[str, str] = None) -> SessionInfo:
|
|
1731
1758
|
"""
|
|
1732
1759
|
Upload a CSV, Parquet, JSON, or JSONL file and create a new session.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
featrixsphere/__init__.py,sha256=0KIOoTFxC1ZjnsIQbvMqD2gqa5aDa7mWAY9B_B1xsIU,1888
|
|
2
|
+
featrixsphere/cli.py,sha256=AW9O3vCvCNJ2UxVGN66eRmeN7XLSiHJlvK6JLZ9UJXc,13358
|
|
3
|
+
featrixsphere/client.py,sha256=5CMSNljJ7OGNRcKHOMoj6fpHFyDr9Y9VGyh7_5-8FmY,381599
|
|
4
|
+
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
5
|
+
featrixsphere-0.2.1232.dist-info/METADATA,sha256=Fi2PjGcsovLf7_Rh1OdnXM4TwKVI9T4RpNGc7ObXYYU,16232
|
|
6
|
+
featrixsphere-0.2.1232.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
featrixsphere-0.2.1232.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
8
|
+
featrixsphere-0.2.1232.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
9
|
+
featrixsphere-0.2.1232.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
featrixsphere/__init__.py,sha256=6ZNdECYPlgKX3-e0SbND5IrBqh0pJWhS6FJQRA_PZX0,1888
|
|
2
|
-
featrixsphere/cli.py,sha256=AW9O3vCvCNJ2UxVGN66eRmeN7XLSiHJlvK6JLZ9UJXc,13358
|
|
3
|
-
featrixsphere/client.py,sha256=6tX2WPxd4qJosxB2t8-UZIXKB9GwM2MqdFO4bOxE4QM,380517
|
|
4
|
-
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
5
|
-
featrixsphere-0.2.1231.dist-info/METADATA,sha256=PZRsauNoEMUGDUkrYe7esdmZDMqMyw84ZWiQG6h3xDM,16232
|
|
6
|
-
featrixsphere-0.2.1231.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
featrixsphere-0.2.1231.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
8
|
-
featrixsphere-0.2.1231.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
9
|
-
featrixsphere-0.2.1231.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|