evalstate HF Staff commited on
Commit
ed7d1ab
·
verified ·
1 Parent(s): b0deb59

Fix schema mismatch: use 'version' instead of 'versions' to match raw split

Browse files
Files changed (1) hide show
  1. deduplicate_clients.py +5 -4
deduplicate_clients.py CHANGED
@@ -12,7 +12,7 @@ Deduplicate MCP clients by name and capabilities.
12
 
13
  This script takes the existing mcp-clients dataset and creates a deduplicated view
14
  where rows are unique by (name, capabilities). When multiple versions exist for
15
- the same (name, capabilities), they are concatenated with "," in a versions column.
16
 
17
  It also strips " (via mcp-remote X.Y.Z)" suffixes from client names and reports
18
  the mcp-remote versions encountered.
@@ -81,9 +81,10 @@ def capabilities_to_string(caps):
81
  def create_dataset_from_deduplicated(deduplicated_list, features=None):
82
  """Create a Hugging Face Dataset from the deduplicated list."""
83
  if features is None:
 
84
  features = Features({
85
  'name': Value('string'),
86
- 'versions': Value('string'),
87
  'capabilities': Value('string'),
88
  'last_seen': Value('string'),
89
  })
@@ -92,7 +93,7 @@ def create_dataset_from_deduplicated(deduplicated_list, features=None):
92
  for client in deduplicated_list:
93
  records.append({
94
  'name': client['name'],
95
- 'versions': client['versions'],
96
  'capabilities': capabilities_to_string(client['capabilities']),
97
  'last_seen': client['last_seen'],
98
  })
@@ -219,7 +220,7 @@ Examples:
219
 
220
  deduplicated.append({
221
  'name': name,
222
- 'versions': versions_str,
223
  'capabilities': latest_record['capabilities'],
224
  'last_seen': latest_record['last_seen'],
225
  })
 
12
 
13
  This script takes the existing mcp-clients dataset and creates a deduplicated view
14
  where rows are unique by (name, capabilities). When multiple versions exist for
15
+ the same (name, capabilities), they are concatenated with "," in a version column.
16
 
17
  It also strips " (via mcp-remote X.Y.Z)" suffixes from client names and reports
18
  the mcp-remote versions encountered.
 
81
  def create_dataset_from_deduplicated(deduplicated_list, features=None):
82
  """Create a Hugging Face Dataset from the deduplicated list."""
83
  if features is None:
84
+ # Use 'version' (singular) to match the raw split schema
85
  features = Features({
86
  'name': Value('string'),
87
+ 'version': Value('string'), # Changed from 'versions' to 'version'
88
  'capabilities': Value('string'),
89
  'last_seen': Value('string'),
90
  })
 
93
  for client in deduplicated_list:
94
  records.append({
95
  'name': client['name'],
96
+ 'version': client['version'], # Changed from 'versions' to 'version'
97
  'capabilities': capabilities_to_string(client['capabilities']),
98
  'last_seen': client['last_seen'],
99
  })
 
220
 
221
  deduplicated.append({
222
  'name': name,
223
+ 'version': versions_str, # Changed from 'versions' to 'version'
224
  'capabilities': latest_record['capabilities'],
225
  'last_seen': latest_record['last_seen'],
226
  })