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

Fix regression: restore 'versions' (plural) field in deduplicated split

Browse files
Files changed (1) hide show
  1. deduplicate_clients.py +5 -5
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 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,10 +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
- # 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,7 +93,7 @@ def create_dataset_from_deduplicated(deduplicated_list, features=None):
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,7 +220,7 @@ Examples:
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
  })
 
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
  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 'versions' (plural) for the deduplicated split
85
  features = Features({
86
  'name': Value('string'),
87
+ 'versions': Value('string'), # FIXED: Changed back to 'versions' (plural)
88
  'capabilities': Value('string'),
89
  'last_seen': Value('string'),
90
  })
 
93
  for client in deduplicated_list:
94
  records.append({
95
  'name': client['name'],
96
+ 'versions': client['versions'], # FIXED: Changed back to 'versions' (plural)
97
  'capabilities': capabilities_to_string(client['capabilities']),
98
  'last_seen': client['last_seen'],
99
  })
 
220
 
221
  deduplicated.append({
222
  'name': name,
223
+ 'versions': versions_str, # FIXED: Changed back to 'versions' (plural)
224
  'capabilities': latest_record['capabilities'],
225
  'last_seen': latest_record['last_seen'],
226
  })