featrixsphere 0.2.4982__py3-none-any.whl → 0.2.4983__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 +9 -30
- {featrixsphere-0.2.4982.dist-info → featrixsphere-0.2.4983.dist-info}/METADATA +1 -1
- featrixsphere-0.2.4983.dist-info/RECORD +8 -0
- featrixsphere-0.2.4982.dist-info/RECORD +0 -8
- {featrixsphere-0.2.4982.dist-info → featrixsphere-0.2.4983.dist-info}/WHEEL +0 -0
- {featrixsphere-0.2.4982.dist-info → featrixsphere-0.2.4983.dist-info}/entry_points.txt +0 -0
- {featrixsphere-0.2.4982.dist-info → featrixsphere-0.2.4983.dist-info}/top_level.txt +0 -0
featrixsphere/__init__.py
CHANGED
featrixsphere/client.py
CHANGED
|
@@ -2845,45 +2845,24 @@ class FeatrixSphereClient:
|
|
|
2845
2845
|
queue_id = self._add_to_prediction_queue(session_id, record, target_column, predictor_id)
|
|
2846
2846
|
return {"queued": True, "queue_id": queue_id}
|
|
2847
2847
|
|
|
2848
|
-
#
|
|
2849
|
-
predictors = self._get_available_predictors(session_id, debug=False)
|
|
2850
|
-
if len(predictors) > 1 and not target_column and not predictor_id:
|
|
2851
|
-
available_targets = [p.get('target_column') for p in predictors.values() if p.get('target_column')]
|
|
2852
|
-
available_ids = list(predictors.keys())
|
|
2853
|
-
raise ValueError(
|
|
2854
|
-
f"Session {session_id} has {len(predictors)} predictors. "
|
|
2855
|
-
f"You must specify either 'target_column' or 'predictor_id'.\n"
|
|
2856
|
-
f"Available target columns: {available_targets}\n"
|
|
2857
|
-
f"Available predictor IDs: {available_ids}\n"
|
|
2858
|
-
f"Use client.list_predictors('{session_id}') to see details."
|
|
2859
|
-
)
|
|
2860
|
-
|
|
2861
|
-
# Resolve predictor information (handles both predictor_id and target_column)
|
|
2862
|
-
predictor_info = self._resolve_predictor_id(session_id, predictor_id, target_column)
|
|
2863
|
-
validated_target_column = predictor_info['target_column']
|
|
2864
|
-
resolved_predictor_id = predictor_info['predictor_id']
|
|
2865
|
-
|
|
2866
|
-
# Clean NaN/Inf values and remove target column
|
|
2848
|
+
# Clean NaN/Inf values
|
|
2867
2849
|
cleaned_record = self._clean_numpy_values(record)
|
|
2868
|
-
# Additional NaN cleaning for JSON encoding
|
|
2869
2850
|
cleaned_record = self.replace_nans_with_nulls(cleaned_record)
|
|
2870
|
-
cleaned_records = self._remove_target_columns(session_id, [cleaned_record], validated_target_column)
|
|
2871
|
-
final_record = cleaned_records[0] if cleaned_records else cleaned_record
|
|
2872
2851
|
|
|
2873
|
-
#
|
|
2852
|
+
# Build request payload - let the server handle predictor resolution
|
|
2874
2853
|
request_payload = {
|
|
2875
|
-
"query_record":
|
|
2876
|
-
"target_column": validated_target_column
|
|
2854
|
+
"query_record": cleaned_record,
|
|
2877
2855
|
}
|
|
2878
2856
|
|
|
2879
|
-
# Include
|
|
2880
|
-
if
|
|
2881
|
-
request_payload["
|
|
2882
|
-
|
|
2883
|
-
|
|
2857
|
+
# Include whatever the caller provided - server will figure it out
|
|
2858
|
+
if target_column:
|
|
2859
|
+
request_payload["target_column"] = target_column
|
|
2860
|
+
if predictor_id:
|
|
2861
|
+
request_payload["predictor_id"] = predictor_id
|
|
2884
2862
|
if best_metric_preference:
|
|
2885
2863
|
request_payload["best_metric_preference"] = best_metric_preference
|
|
2886
2864
|
|
|
2865
|
+
# Just send it to the server - it has all the smart fallback logic
|
|
2887
2866
|
response_data = self._post_json(f"/session/{session_id}/predict", request_payload, max_retries=max_retries)
|
|
2888
2867
|
return response_data
|
|
2889
2868
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
featrixsphere/__init__.py,sha256=IRi4Di6zgujpSsWTJi0VL5b8yhjUGd9z_XFXJT2uWi8,1888
|
|
2
|
+
featrixsphere/client.py,sha256=kWGR7cYH0IDWNZDX5w8yPP9-2wA-3KfXxFlYl6w01wE,431295
|
|
3
|
+
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
4
|
+
featrixsphere-0.2.4983.dist-info/METADATA,sha256=UxwPQet3orfLfAsNhHh1Bvn_QfV2ZXpuBL9AWYyjvxg,16232
|
|
5
|
+
featrixsphere-0.2.4983.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
featrixsphere-0.2.4983.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
7
|
+
featrixsphere-0.2.4983.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
8
|
+
featrixsphere-0.2.4983.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
featrixsphere/__init__.py,sha256=6e5gN0j6g8dLuetEEDGVk9ZXasdgsuii0qNF83OQIYU,1888
|
|
2
|
-
featrixsphere/client.py,sha256=HouSLZcEoGjKZy9c0HK0TG-Xog7L_12kCik54TrwzS8,432653
|
|
3
|
-
featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
|
|
4
|
-
featrixsphere-0.2.4982.dist-info/METADATA,sha256=DI-xhIm1bAk2rz-5XxK-2jdQsySuQGRZPTLN7LcxEiM,16232
|
|
5
|
-
featrixsphere-0.2.4982.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
featrixsphere-0.2.4982.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
|
|
7
|
-
featrixsphere-0.2.4982.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
|
|
8
|
-
featrixsphere-0.2.4982.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|