Fix: use config name when loading multi-config dataset
Browse files- deduplicate_clients.py +10 -5
deduplicate_clients.py
CHANGED
|
@@ -142,8 +142,10 @@ Examples:
|
|
| 142 |
parser.add_argument("-o", "--output", help="Output file path (default: stdout)")
|
| 143 |
parser.add_argument("--source-repo", default="evalstate/mcp-clients",
|
| 144 |
help="Source repository ID (default: evalstate/mcp-clients)")
|
| 145 |
-
parser.add_argument("--source-
|
| 146 |
-
help="Source
|
|
|
|
|
|
|
| 147 |
parser.add_argument("--target-repo", default="evalstate/mcp-clients",
|
| 148 |
help="Target repository ID (default: evalstate/mcp-clients)")
|
| 149 |
parser.add_argument("--target-split", default="deduplicated",
|
|
@@ -156,10 +158,13 @@ Examples:
|
|
| 156 |
help="Create/push to a private repository")
|
| 157 |
args = parser.parse_args()
|
| 158 |
|
| 159 |
-
|
|
|
|
| 160 |
|
| 161 |
-
|
| 162 |
-
|
|
|
|
|
|
|
| 163 |
|
| 164 |
print(f"[{datetime.now().isoformat()}] Loaded {len(ds):,} client records", file=sys.stderr)
|
| 165 |
|
|
|
|
| 142 |
parser.add_argument("-o", "--output", help="Output file path (default: stdout)")
|
| 143 |
parser.add_argument("--source-repo", default="evalstate/mcp-clients",
|
| 144 |
help="Source repository ID (default: evalstate/mcp-clients)")
|
| 145 |
+
parser.add_argument("--source-config", default="raw",
|
| 146 |
+
help="Source config name (default: raw)")
|
| 147 |
+
parser.add_argument("--source-split", default=None,
|
| 148 |
+
help="Source split name (optional, defaults to config name)")
|
| 149 |
parser.add_argument("--target-repo", default="evalstate/mcp-clients",
|
| 150 |
help="Target repository ID (default: evalstate/mcp-clients)")
|
| 151 |
parser.add_argument("--target-split", default="deduplicated",
|
|
|
|
| 158 |
help="Create/push to a private repository")
|
| 159 |
args = parser.parse_args()
|
| 160 |
|
| 161 |
+
# Use config name as split if not specified
|
| 162 |
+
source_split = args.source_split or args.source_config
|
| 163 |
|
| 164 |
+
print(f"[{datetime.now().isoformat()}] Loading dataset from {args.source_repo} (config: {args.source_config}, split: {source_split})...", file=sys.stderr)
|
| 165 |
+
|
| 166 |
+
# Load the source dataset using config name (required for multi-config datasets)
|
| 167 |
+
ds = load_dataset(args.source_repo, args.source_config, split=source_split)
|
| 168 |
|
| 169 |
print(f"[{datetime.now().isoformat()}] Loaded {len(ds):,} client records", file=sys.stderr)
|
| 170 |
|