featrixsphere 0.2.1230__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 +28 -11
- {featrixsphere-0.2.1230.dist-info → featrixsphere-0.2.1232.dist-info}/METADATA +1 -1
- featrixsphere-0.2.1232.dist-info/RECORD +9 -0
- featrixsphere-0.2.1230.dist-info/RECORD +0 -9
- {featrixsphere-0.2.1230.dist-info → featrixsphere-0.2.1232.dist-info}/WHEEL +0 -0
- {featrixsphere-0.2.1230.dist-info → featrixsphere-0.2.1232.dist-info}/entry_points.txt +0 -0
- {featrixsphere-0.2.1230.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.
|
|
@@ -4114,7 +4141,7 @@ class FeatrixSphereClient:
|
|
|
4114
4141
|
df = None,
|
|
4115
4142
|
name: str = None,
|
|
4116
4143
|
session_name_prefix: str = None,
|
|
4117
|
-
epochs: int = 0,
|
|
4144
|
+
epochs: int = 0,
|
|
4118
4145
|
rare_label_value: str = None,
|
|
4119
4146
|
class_imbalance: dict = None,
|
|
4120
4147
|
optimize_for: str = "balanced",
|
|
@@ -4138,8 +4165,6 @@ class FeatrixSphereClient:
|
|
|
4138
4165
|
name: Optional name for the new session
|
|
4139
4166
|
session_name_prefix: Optional prefix for session ID. Session will be named <prefix>-<uuid>
|
|
4140
4167
|
epochs: Number of training epochs (default: 0; automatic)
|
|
4141
|
-
batch_size: Training batch size (default: 0; automatic)
|
|
4142
|
-
learning_rate: Learning rate for training (default: 0.001)
|
|
4143
4168
|
rare_label_value: For binary classification, which class is the rare/minority class for metrics (default: None)
|
|
4144
4169
|
class_imbalance: Expected class ratios/counts from real world for sampled data (default: None)
|
|
4145
4170
|
optimize_for: Optimization target - "balanced" (F1 score), "precision", or "recall" (default: "balanced")
|
|
@@ -4201,8 +4226,6 @@ class FeatrixSphereClient:
|
|
|
4201
4226
|
"target_column": target_column,
|
|
4202
4227
|
"target_column_type": target_column_type,
|
|
4203
4228
|
"epochs": epochs,
|
|
4204
|
-
"batch_size": batch_size,
|
|
4205
|
-
"learning_rate": learning_rate,
|
|
4206
4229
|
"optimize_for": optimize_for,
|
|
4207
4230
|
}
|
|
4208
4231
|
|
|
@@ -5048,7 +5071,6 @@ class FeatrixSphereClient:
|
|
|
5048
5071
|
|
|
5049
5072
|
def train_predictor_more(self, session_id: str, epochs: int = 50,
|
|
5050
5073
|
predictor_id: str = None, target_column: str = None,
|
|
5051
|
-
batch_size: int = 0, learning_rate: float = None,
|
|
5052
5074
|
poll_interval: int = 30, max_poll_time: int = 3600,
|
|
5053
5075
|
verbose: bool = True, webhooks: Dict[str, str] = None) -> Dict[str, Any]:
|
|
5054
5076
|
"""
|
|
@@ -5060,8 +5082,6 @@ class FeatrixSphereClient:
|
|
|
5060
5082
|
epochs: Additional epochs to train (required)
|
|
5061
5083
|
predictor_id: Predictor ID to continue training (optional, highest priority)
|
|
5062
5084
|
target_column: Target column name to find predictor (optional, alternative to predictor_id)
|
|
5063
|
-
batch_size: Batch size for continuation (0 = use existing from predictor)
|
|
5064
|
-
learning_rate: Learning rate for continuation (None = use existing from predictor)
|
|
5065
5085
|
poll_interval: Seconds between status checks (default: 30)
|
|
5066
5086
|
max_poll_time: Maximum time to poll in seconds (default: 3600 = 1 hour)
|
|
5067
5087
|
verbose: Whether to print status updates (default: True)
|
|
@@ -5088,15 +5108,12 @@ class FeatrixSphereClient:
|
|
|
5088
5108
|
|
|
5089
5109
|
data = {
|
|
5090
5110
|
"epochs": epochs,
|
|
5091
|
-
"batch_size": batch_size,
|
|
5092
5111
|
}
|
|
5093
5112
|
|
|
5094
5113
|
if predictor_id:
|
|
5095
5114
|
data["predictor_id"] = predictor_id
|
|
5096
5115
|
if target_column:
|
|
5097
5116
|
data["target_column"] = target_column
|
|
5098
|
-
if learning_rate is not None:
|
|
5099
|
-
data["learning_rate"] = learning_rate
|
|
5100
5117
|
if webhooks:
|
|
5101
5118
|
data["webhooks"] = webhooks
|
|
5102
5119
|
|
|
@@ -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=tnkQwrMlNHh8-4w9WYVZYPiQww0g-5xlzvUEH_Cm1qE,1888
|
|
2
|
-
featrixsphere/cli.py,sha256=AW9O3vCvCNJ2UxVGN66eRmeN7XLSiHJlvK6JLZ9UJXc,13358
|
|
3
|
-
featrixsphere/client.py,sha256=y5x_zTSryHMy-R7pleySQnkpdoztcSxq8D2cdtwNLpM,381173
|
|
4
|
-
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
5
|
-
featrixsphere-0.2.1230.dist-info/METADATA,sha256=lBjYeP-nnr3rNJ7DnoArU7W853OAL_L1N2PXvVBAIDI,16232
|
|
6
|
-
featrixsphere-0.2.1230.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
featrixsphere-0.2.1230.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
8
|
-
featrixsphere-0.2.1230.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
9
|
-
featrixsphere-0.2.1230.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|