featrixsphere 0.2.5182__py3-none-any.whl → 0.2.5183__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.5182"
41
+ __version__ = "0.2.5183"
42
42
  __author__ = "Featrix"
43
43
  __email__ = "support@featrix.com"
44
44
  __license__ = "MIT"
featrixsphere/client.py CHANGED
@@ -8287,6 +8287,55 @@ class FeatrixSphereClient:
8287
8287
  """
8288
8288
  return PredictionGrid(session_id, self, degrees_of_freedom, grid_shape, target_column)
8289
8289
 
8290
+ def get_embedding_space_columns(self, session_id: str) -> Dict[str, Any]:
8291
+ """
8292
+ Get column names and types from the embedding space.
8293
+
8294
+ Tries to get from model_card.json first (if training completed),
8295
+ otherwise falls back to loading the embedding space directly.
8296
+
8297
+ Args:
8298
+ session_id: Session ID with trained embedding space
8299
+
8300
+ Returns:
8301
+ Dictionary with:
8302
+ - column_names: List of column names
8303
+ - column_types: Dict mapping column names to types (scalar, set, free_string, etc.)
8304
+ - num_columns: Total number of columns
8305
+
8306
+ Example:
8307
+ >>> columns = client.get_embedding_space_columns(session_id)
8308
+ >>> print(f"Columns: {columns['column_names']}")
8309
+ >>> print(f"Types: {columns['column_types']}")
8310
+ """
8311
+ # Try model_card first (if training completed)
8312
+ try:
8313
+ model_card = self.get_model_card(session_id)
8314
+
8315
+ # Extract column names from training_dataset.feature_names
8316
+ training_dataset = model_card.get('training_dataset', {})
8317
+ column_names = training_dataset.get('feature_names', [])
8318
+
8319
+ # Extract column types from feature_inventory
8320
+ feature_inventory = model_card.get('feature_inventory', {})
8321
+ column_types = {}
8322
+ for feature_name, feature_info in feature_inventory.items():
8323
+ if isinstance(feature_info, dict):
8324
+ column_types[feature_name] = feature_info.get('type', 'unknown')
8325
+
8326
+ if column_names:
8327
+ return {
8328
+ "column_names": column_names,
8329
+ "column_types": column_types,
8330
+ "num_columns": len(column_names)
8331
+ }
8332
+ except Exception:
8333
+ # Model card doesn't exist yet, fall back to direct endpoint
8334
+ pass
8335
+
8336
+ # Fallback: load embedding space directly
8337
+ return self._get_json(f"/compute/session/{session_id}/columns")
8338
+
8290
8339
 
8291
8340
  class PredictionGrid:
8292
8341
  """
@@ -9032,55 +9081,6 @@ class PredictionGrid:
9032
9081
  else:
9033
9082
  return fig
9034
9083
 
9035
- def get_embedding_space_columns(self, session_id: str) -> Dict[str, Any]:
9036
- """
9037
- Get column names and types from the embedding space.
9038
-
9039
- Tries to get from model_card.json first (if training completed),
9040
- otherwise falls back to loading the embedding space directly.
9041
-
9042
- Args:
9043
- session_id: Session ID with trained embedding space
9044
-
9045
- Returns:
9046
- Dictionary with:
9047
- - column_names: List of column names
9048
- - column_types: Dict mapping column names to types (scalar, set, free_string, etc.)
9049
- - num_columns: Total number of columns
9050
-
9051
- Example:
9052
- >>> columns = client.get_embedding_space_columns(session_id)
9053
- >>> print(f"Columns: {columns['column_names']}")
9054
- >>> print(f"Types: {columns['column_types']}")
9055
- """
9056
- # Try model_card first (if training completed)
9057
- try:
9058
- model_card = self.get_model_card(session_id)
9059
-
9060
- # Extract column names from training_dataset.feature_names
9061
- training_dataset = model_card.get('training_dataset', {})
9062
- column_names = training_dataset.get('feature_names', [])
9063
-
9064
- # Extract column types from feature_inventory
9065
- feature_inventory = model_card.get('feature_inventory', {})
9066
- column_types = {}
9067
- for feature_name, feature_info in feature_inventory.items():
9068
- if isinstance(feature_info, dict):
9069
- column_types[feature_name] = feature_info.get('type', 'unknown')
9070
-
9071
- if column_names:
9072
- return {
9073
- "column_names": column_names,
9074
- "column_types": column_types,
9075
- "num_columns": len(column_names)
9076
- }
9077
- except Exception:
9078
- # Model card doesn't exist yet, fall back to direct endpoint
9079
- pass
9080
-
9081
- # Fallback: load embedding space directly
9082
- return self._get_json(f"/compute/session/{session_id}/columns")
9083
-
9084
9084
  def get_predictor_schema(self, session_id: str, predictor_index: int = 0) -> Dict[str, Any]:
9085
9085
  """
9086
9086
  Get predictor schema/metadata for validating input data locally.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: featrixsphere
3
- Version: 0.2.5182
3
+ Version: 0.2.5183
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,7 @@
1
+ featrixsphere/__init__.py,sha256=tPVhFLHujHMC0bnsnjggdMIb2chNkYbbm0wUX-lwWYY,1888
2
+ featrixsphere/client.py,sha256=YvOB2y8zh4iCMccXQ-4ZsQ8dgmUSQlkLh2zsxIiIoYM,435090
3
+ featrixsphere-0.2.5183.dist-info/METADATA,sha256=BEVBhDxyQvjFfDWyzSSKTZLwybnQFyPYU6dk_cxB5CM,16232
4
+ featrixsphere-0.2.5183.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ featrixsphere-0.2.5183.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
6
+ featrixsphere-0.2.5183.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
7
+ featrixsphere-0.2.5183.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- featrixsphere/__init__.py,sha256=IsFr56pqNLZdE9VfJJgYXY7FiHx2WW29eoUB3urP_-g,1888
2
- featrixsphere/client.py,sha256=8rcft0KMNkW3pUQPsk70ZudWJB_ndCPQBj_MctMf7a0,435094
3
- featrixsphere-0.2.5182.dist-info/METADATA,sha256=TEPYBNmlbLMAkQsd5ri0N2qMdjZogp94erecVxC48EQ,16232
4
- featrixsphere-0.2.5182.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
- featrixsphere-0.2.5182.dist-info/entry_points.txt,sha256=QreJeYfD_VWvbEqPmMXZ3pqqlFlJ1qZb-NtqnyhEldc,51
6
- featrixsphere-0.2.5182.dist-info/top_level.txt,sha256=AyN4wjfzlD0hWnDieuEHX0KckphIk_aC73XCG4df5uU,14
7
- featrixsphere-0.2.5182.dist-info/RECORD,,