featrixsphere 0.2.4984__py3-none-any.whl → 0.2.4991__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 CHANGED
@@ -38,7 +38,7 @@ Example:
38
38
  ... labels=['Experiment A', 'Experiment B'])
39
39
  """
40
40
 
41
- __version__ = "0.2.4984"
41
+ __version__ = "0.2.4991"
42
42
  __author__ = "Featrix"
43
43
  __email__ = "support@featrix.com"
44
44
  __license__ = "MIT"
featrixsphere/client.py CHANGED
@@ -3985,108 +3985,6 @@ class FeatrixSphereClient:
3985
3985
 
3986
3986
  return predictor_id
3987
3987
 
3988
- def _resolve_predictor_id(self, session_id: str, predictor_id: str = None, target_column: str = None, debug: bool = False) -> Dict[str, Any]:
3989
- """
3990
- Resolve predictor_id or target_column to predictor information.
3991
-
3992
- Args:
3993
- session_id: Session ID to check
3994
- predictor_id: Specific predictor ID to resolve
3995
- target_column: Target column name (fallback if predictor_id not provided)
3996
- debug: Whether to print debug information
3997
-
3998
- Returns:
3999
- Dictionary with predictor info including target_column, path, predictor_id
4000
-
4001
- Raises:
4002
- ValueError: If predictor not found or ambiguous
4003
- """
4004
- available_predictors = self._get_available_predictors(session_id, debug=debug)
4005
-
4006
- if not available_predictors:
4007
- # Don't fail here - let the server try to find/auto-discover the predictor
4008
- # The server's /predict endpoint has smart fallback logic to find checkpoint files
4009
- # even if the session file wasn't properly updated (e.g., training crashed)
4010
- if debug:
4011
- print(f"⚠️ No predictors found via models endpoint, letting server handle discovery")
4012
- return {
4013
- 'target_column': target_column,
4014
- 'predictor_id': predictor_id,
4015
- 'path': None,
4016
- 'type': None,
4017
- 'server_discovery': True # Flag that server should auto-discover
4018
- }
4019
-
4020
- # If predictor_id is provided, find it directly (since it's now the key)
4021
- if predictor_id:
4022
- if predictor_id in available_predictors:
4023
- predictor_info = available_predictors[predictor_id]
4024
- return {
4025
- 'target_column': predictor_info.get('target_column'),
4026
- 'predictor_id': predictor_id,
4027
- 'path': predictor_info.get('path'),
4028
- 'type': predictor_info.get('type')
4029
- }
4030
-
4031
- # Predictor ID not found
4032
- all_predictor_ids = list(available_predictors.keys())
4033
-
4034
- raise ValueError(
4035
- f"Predictor ID '{predictor_id}' not found for session {session_id}. "
4036
- f"Available predictor IDs: {all_predictor_ids}"
4037
- )
4038
-
4039
- # Fallback to target_column validation (search through values)
4040
- if target_column is None:
4041
- # Auto-detect: only valid if there's exactly one predictor
4042
- if len(available_predictors) == 1:
4043
- predictor_id = list(available_predictors.keys())[0]
4044
- predictor_info = available_predictors[predictor_id]
4045
- return {
4046
- 'target_column': predictor_info.get('target_column'),
4047
- 'predictor_id': predictor_id,
4048
- 'path': predictor_info.get('path'),
4049
- 'type': predictor_info.get('type')
4050
- }
4051
- else:
4052
- # Show unique target columns for clarity
4053
- target_columns = list(set(pred.get('target_column') for pred in available_predictors.values()))
4054
- raise ValueError(
4055
- f"Multiple predictors found for session {session_id} with target columns: {target_columns}. "
4056
- f"Please specify predictor_id parameter for precise selection."
4057
- )
4058
- else:
4059
- # Find predictors by target column (there might be multiple)
4060
- matching_predictors = {
4061
- pred_id: pred_info for pred_id, pred_info in available_predictors.items()
4062
- if pred_info.get('target_column') == target_column
4063
- }
4064
-
4065
- if not matching_predictors:
4066
- target_columns = list(set(pred.get('target_column') for pred in available_predictors.values()))
4067
- raise ValueError(
4068
- f"No trained predictor found for target column '{target_column}' in session {session_id}. "
4069
- f"Available target columns: {target_columns}"
4070
- )
4071
-
4072
- if len(matching_predictors) == 1:
4073
- # Only one predictor for this target column
4074
- predictor_id = list(matching_predictors.keys())[0]
4075
- predictor_info = matching_predictors[predictor_id]
4076
- return {
4077
- 'target_column': target_column,
4078
- 'predictor_id': predictor_id,
4079
- 'path': predictor_info.get('path'),
4080
- 'type': predictor_info.get('type')
4081
- }
4082
- else:
4083
- # Multiple predictors for the same target column
4084
- predictor_ids = list(matching_predictors.keys())
4085
- raise ValueError(
4086
- f"Multiple predictors found for target column '{target_column}' in session {session_id}: {predictor_ids}. "
4087
- f"Please specify predictor_id parameter for precise selection."
4088
- )
4089
-
4090
3988
  def list_predictors(self, session_id: str, verbose: bool = True, debug: bool = False) -> Dict[str, Dict[str, Any]]:
4091
3989
  """
4092
3990
  List all available predictors in a session and their target columns.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: featrixsphere
3
- Version: 0.2.4984
3
+ Version: 0.2.4991
4
4
  Summary: Transform any CSV into a production-ready ML model in minutes, not months.
5
5
  Home-page: https://github.com/Featrix/sphere
6
6
  Author: Featrix
@@ -0,0 +1,8 @@
1
+ featrixsphere/__init__.py,sha256=UaVSYqUbFAR92BWYcQkfV7lVfnbogtZFbAJTgDdmUQo,1888
2
+ featrixsphere/client.py,sha256=bqRRyumplQmeRDrxyyhYcj_VIOnl_svh-fJ8VUcxBv4,426243
3
+ featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
4
+ featrixsphere-0.2.4991.dist-info/METADATA,sha256=DOj--UmpmV2TsuBAtsn72NYFRwn6Nipqq71oGj_bAnc,16232
5
+ featrixsphere-0.2.4991.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ featrixsphere-0.2.4991.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
7
+ featrixsphere-0.2.4991.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
8
+ featrixsphere-0.2.4991.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- featrixsphere/__init__.py,sha256=IU_WDJxGy4vfrUELv_Y381Oj_bzfD4GTcbgnqrIOigQ,1888
2
- featrixsphere/client.py,sha256=kWGR7cYH0IDWNZDX5w8yPP9-2wA-3KfXxFlYl6w01wE,431295
3
- featrixsphere/test_client.py,sha256=4SiRbib0ms3poK0UpnUv4G0HFQSzidF3Iswo_J2cjLk,11981
4
- featrixsphere-0.2.4984.dist-info/METADATA,sha256=sRgn36Uyp-gIc-OwlnscbzyMerml0dFm7DPVwX8iBrs,16232
5
- featrixsphere-0.2.4984.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- featrixsphere-0.2.4984.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
7
- featrixsphere-0.2.4984.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
8
- featrixsphere-0.2.4984.dist-info/RECORD,,