icoa-cli 2.19.447 → 2.19.449

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.
@@ -14,7 +14,14 @@
14
14
  "dir": "sound-of-nature-aicc-round-3",
15
15
  "topic_cn": "360 条 5 秒自然/动物声音的多类分类(cat 等类别),官方解答 = mel-spectrogram + CNN + macro F1 选模",
16
16
  "comp": "s01-sound-of-nature",
17
- "status": "ready"
17
+ "status": "ready",
18
+ "baseline": "none",
19
+ "media": {
20
+ "kind": "audio",
21
+ "pack": "s01-sound-of-nature",
22
+ "mb": 152,
23
+ "glob": "audio/*.wav"
24
+ }
18
25
  },
19
26
  {
20
27
  "seq": 2,
@@ -28,7 +35,8 @@
28
35
  "dir": "mortys-time-paradox-aicc-round-3",
29
36
  "topic_cn": "8 个周期性特征的无标签聚类:先用 sin/cos 周期编码还原结构,再聚类 + 候选标签多数投票定类",
30
37
  "comp": "s02-mortys-time-paradox",
31
- "status": "ready"
38
+ "status": "ready",
39
+ "baseline": "val acc 0.79"
32
40
  },
33
41
  {
34
42
  "seq": 3,
@@ -42,7 +50,8 @@
42
50
  "dir": "nitro/53_roai-2025_lot-baraj-2_t1_how-toxic-are-you-online",
43
51
  "topic_cn": "国家队选拔第2日:四标签毒性多标签分类,逐标签F1线性插值计分,另在30%子集上单独评稳健性;赛中明令禁用transformers",
44
52
  "comp": "s03-how-toxic-are-you-online",
45
- "status": "ready"
53
+ "status": "ready",
54
+ "baseline": "val acc 0.935"
46
55
  },
47
56
  {
48
57
  "seq": 4,
@@ -56,7 +65,8 @@
56
65
  "dir": "is-that-audio-aicc-round-1-2",
57
66
  "topic_cn": "260 条 wav 的多类音频分类(A/B 两组前缀),官方解答走 mel-spectrogram + CNN;官方承认该轮数据存在泄漏,定位为教学素材",
58
67
  "comp": "s04-is-that-audio",
59
- "status": "ready"
68
+ "status": "ready",
69
+ "baseline": "val acc 0.811"
60
70
  },
61
71
  {
62
72
  "seq": 5,
@@ -71,7 +81,8 @@
71
81
  "topic_cn": "给出文章缺口的前文/后文与 4 个候选句,选出被挖掉的那一句(BERT 微调四选一)",
72
82
  "comp": "s05-essay-gap",
73
83
  "status": "ready",
74
- "judged": true
84
+ "judged": true,
85
+ "baseline": "val acc 0.275"
75
86
  },
76
87
  {
77
88
  "seq": 6,
@@ -88,7 +99,14 @@
88
99
  "status": "teleload",
89
100
  "pack": "s06-face-matching-aicc-round-2",
90
101
  "pack_mb": 8,
91
- "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s06-face-matching-aicc-round-2.tar.zst"
102
+ "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s06-face-matching-aicc-round-2.tar.zst",
103
+ "baseline": "none",
104
+ "media": {
105
+ "kind": "image",
106
+ "pack": "s06-face-matching-aicc-round-2",
107
+ "mb": 8,
108
+ "glob": "face-matching/images/*.jpg"
109
+ }
92
110
  },
93
111
  {
94
112
  "seq": 7,
@@ -103,7 +121,8 @@
103
121
  "topic_cn": "科学论断 × 证据段落的三分类蕴含判断(支持/反驳/信息不足),官方解答 = transformer 微调 + 交叉验证 ensemble,macro F1",
104
122
  "comp": "s07-scientific-facts",
105
123
  "status": "ready",
106
- "judged": true
124
+ "judged": true,
125
+ "baseline": "val acc 0.641"
107
126
  },
108
127
  {
109
128
  "seq": 8,
@@ -117,7 +136,8 @@
117
136
  "dir": "nitro/47_nitro_spooky-round-2025_t2_spooky-disaster-or-creepy-pizza",
118
137
  "topic_cn": "音频修复:500段声音各4000个采样点,部分片段被填0,重建缺失值(MSE);数据200Hz生成、需重采样到44.1kHz才可听",
119
138
  "comp": "s08-spooky-disaster-or-creepy-pizza",
120
- "status": "ready"
139
+ "status": "ready",
140
+ "baseline": "val RMSE 0.726"
121
141
  },
122
142
  {
123
143
  "seq": 9,
@@ -131,7 +151,8 @@
131
151
  "dir": "alchemy-aicc-round-4",
132
152
  "topic_cn": "「小炼金术」式语义合成:给 item1+item2 预测合成结果(如 bird+fire→phoenix),候选集封闭,官方解答用 BERT 打分 + 匈牙利算法做全局指派",
133
153
  "comp": "s09-alchemy",
134
- "status": "ready"
154
+ "status": "ready",
155
+ "baseline": "val acc 0.000"
135
156
  },
136
157
  {
137
158
  "seq": 10,
@@ -145,7 +166,8 @@
145
166
  "dir": "nitro/24_algolymp_algolymp-preojia-xi-xii_t2_hello-aliens",
146
167
  "topic_cn": "50维射电频谱:①信号/噪声二分类(F1≥0.98) ②接触概率回归 ③来源三分类;题面明说有效信号只住在低维流形上",
147
168
  "comp": "s10-hello-aliens",
148
- "status": "ready"
169
+ "status": "ready",
170
+ "baseline": "val RMSE 19.29"
149
171
  },
150
172
  {
151
173
  "seq": 11,
@@ -162,7 +184,14 @@
162
184
  "status": "teleload",
163
185
  "pack": "s11-haunt-me",
164
186
  "pack_mb": 65,
165
- "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s11-haunt-me.tar.zst"
187
+ "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s11-haunt-me.tar.zst",
188
+ "baseline": "none",
189
+ "media": {
190
+ "kind": "image",
191
+ "pack": "s11-haunt-me",
192
+ "mb": 65,
193
+ "glob": "Starter_kit/images/{train,inference}/*.jpg"
194
+ }
166
195
  },
167
196
  {
168
197
  "seq": 12,
@@ -176,7 +205,13 @@
176
205
  "dir": "audio-demixing-aicc-round-2",
177
206
  "topic_cn": "2897 条 5 秒 wav:把混合音轨拆成两路信号,UNet + PIT(置换不变)损失,提交两路波形的 base85 编码",
178
207
  "comp": "s12-audio-demixing",
179
- "status": "ready"
208
+ "status": "ready",
209
+ "baseline": "val acc 0.000",
210
+ "media": {
211
+ "kind": "audio",
212
+ "pack": "audio-demixing-aicc-round-2",
213
+ "mb": 1223
214
+ }
180
215
  },
181
216
  {
182
217
  "seq": 13,
@@ -190,7 +225,8 @@
190
225
  "dir": "polarity-aicc-round-7",
191
226
  "topic_cn": "判断词对是同义还是反义(cash/money=0,inferior/worse=?)——训练集只有 897 字节(约 40 对),官方解答用掩码语言模型在模板句上取 logit 当特征再训分类器",
192
227
  "comp": "s13-polarity",
193
- "status": "ready"
228
+ "status": "ready",
229
+ "baseline": "val acc 0.600"
194
230
  },
195
231
  {
196
232
  "seq": 15,
@@ -207,7 +243,14 @@
207
243
  "status": "teleload",
208
244
  "pack": "s15-find-the-ducks",
209
245
  "pack_mb": 535,
210
- "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s15-find-the-ducks.tar.zst"
246
+ "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s15-find-the-ducks.tar.zst",
247
+ "baseline": "none",
248
+ "media": {
249
+ "kind": "archive",
250
+ "pack": "s15-find-the-ducks",
251
+ "mb": 535,
252
+ "glob": "custom_archive__custom_archive.zip"
253
+ }
211
254
  },
212
255
  {
213
256
  "seq": 16,
@@ -221,7 +264,8 @@
221
264
  "dir": "lost-interpreter-aicc-round-5",
222
265
  "topic_cn": "给一段自定义字节码程序(OP5 13 ; OP7 -2 ; …)预测其数值输出,官方解答用 LSTM 端到端学「执行」,判分 MAE",
223
266
  "comp": "s16-lost-interpreter",
224
- "status": "ready"
267
+ "status": "ready",
268
+ "baseline": "val RMSE 103.70"
225
269
  },
226
270
  {
227
271
  "seq": 17,
@@ -236,7 +280,8 @@
236
280
  "topic_cn": "①英文商品描述判可食用(macro F1) ②西班牙语查询跨语种检索英文商品(top-1);训练集里is_food=-1的行专供跨语种对齐",
237
281
  "comp": "s17-bazarul-lui-riki",
238
282
  "status": "ready",
239
- "judged": true
283
+ "judged": true,
284
+ "baseline": "val acc 0.955"
240
285
  },
241
286
  {
242
287
  "seq": 18,
@@ -250,7 +295,8 @@
250
295
  "dir": "nitro/30_nitro_pre-iaio-2026_t4_the-hieroglyph-hunter",
251
296
  "topic_cn": "emoji序列→英文句子语义检索:1000句语料(含爱丽丝梦游仙境干扰句),查询分字面/习语/网络俚语三档难度,只给少量support示例",
252
297
  "comp": "s18-the-hieroglyph-hunter",
253
- "status": "ready"
298
+ "status": "ready",
299
+ "baseline": "none"
254
300
  },
255
301
  {
256
302
  "seq": 19,
@@ -265,7 +311,8 @@
265
311
  "topic_cn": "128×128合成月面图:①数陨石坑个数(MAE) ②估计侵蚀年龄参数1.0-5.0(MAE)",
266
312
  "comp": "s19-lunar-craters",
267
313
  "status": "ready",
268
- "judged": true
314
+ "judged": true,
315
+ "baseline": "val RMSE 1.076"
269
316
  },
270
317
  {
271
318
  "seq": 20,
@@ -282,7 +329,14 @@
282
329
  "status": "teleload",
283
330
  "pack": "s20-latent-model-classification-ai",
284
331
  "pack_mb": 5,
285
- "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s20-latent-model-classification-ai.tar.zst"
332
+ "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s20-latent-model-classification-ai.tar.zst",
333
+ "baseline": "pack",
334
+ "media": {
335
+ "kind": "weights",
336
+ "pack": "s20-latent-model-classification-ai",
337
+ "mb": 5,
338
+ "glob": "modelA_penultimate.pth"
339
+ }
286
340
  },
287
341
  {
288
342
  "seq": 21,
@@ -296,7 +350,8 @@
296
350
  "dir": "autocorrect-aicc-round-1-2",
297
351
  "topic_cn": "13MB 英文语料的字符级纠错:错字文本与正确文本等长,官方明确提示用 encoder-only 而非 seq2seq,且整段推理必须在 250 秒内跑完",
298
352
  "comp": "s21-autocorrect",
299
- "status": "ready"
353
+ "status": "ready",
354
+ "baseline": "val acc 0.0005"
300
355
  },
301
356
  {
302
357
  "seq": 22,
@@ -313,7 +368,14 @@
313
368
  "status": "teleload",
314
369
  "pack": "s22-sticky-note-blindness-aicc-rou",
315
370
  "pack_mb": 87,
316
- "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s22-sticky-note-blindness-aicc-rou.tar.zst"
371
+ "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s22-sticky-note-blindness-aicc-rou.tar.zst",
372
+ "baseline": "none",
373
+ "media": {
374
+ "kind": "weights",
375
+ "pack": "s22-sticky-note-blindness-aicc-rou",
376
+ "mb": 87,
377
+ "glob": "class_embeddings.pt"
378
+ }
317
379
  },
318
380
  {
319
381
  "seq": 23,
@@ -328,7 +390,8 @@
328
390
  "topic_cn": "全国赛:①文本是人写还是AI生成(macro F1≥95才满分) ②四大主题分类——但训练集根本没有主题标签,必须零样本/无监督做",
329
391
  "comp": "s23-om-vs-ai",
330
392
  "status": "ready",
331
- "judged": true
393
+ "judged": true,
394
+ "baseline": "val acc 0.934"
332
395
  },
333
396
  {
334
397
  "seq": 24,
@@ -342,7 +405,8 @@
342
405
  "dir": "nitro/56_roai-2025_lot-baraj-1_t2_angry-birds",
343
406
  "topic_cn": "国家队选拔:训练集里土鸟几乎总配陆地背景、水鸟几乎总配水背景;最终按(鸟种×背景)四种组合中最差的一档准确率计分;允许ResNet50",
344
407
  "comp": "s24-angry-birds",
345
- "status": "ready"
408
+ "status": "ready",
409
+ "baseline": "val acc 0.756"
346
410
  },
347
411
  {
348
412
  "seq": 25,
@@ -356,7 +420,8 @@
356
420
  "dir": "nitro/49_cram-school_cram-school-training-1_t2_smart-waste-classifier",
357
421
  "topic_cn": "垃圾图六分类(纸板/塑料/其他/玻璃/金属/纸),macro F1",
358
422
  "comp": "s25-smart-waste-classifier",
359
- "status": "ready"
423
+ "status": "ready",
424
+ "baseline": "val acc 0.182"
360
425
  },
361
426
  {
362
427
  "seq": 26,
@@ -375,7 +440,14 @@
375
440
  "pack_mb": 7,
376
441
  "pack_url": "https://icoa-datasets.sg-sin-1.linodeobjects.com/aidata/s26-x-planet-x-model-selection.tar.zst",
377
442
  "submit_shape": "indices",
378
- "submit_note": "Answer is 5 model indices, not a per-row prediction — there is no test.csv to score and none is needed. Scored at judge.nitro-ai.org; an official 100-point solution exists to check yourself against."
443
+ "submit_note": "Answer is 5 model indices, not a per-row prediction — there is no test.csv to score and none is needed. Scored at judge.nitro-ai.org; an official 100-point solution exists to check yourself against.",
444
+ "baseline": "none",
445
+ "media": {
446
+ "kind": "archive",
447
+ "pack": "s26-x-planet-x-model-selection",
448
+ "mb": 7,
449
+ "glob": "train_data__train_data.csv"
450
+ }
379
451
  }
380
452
  ]
381
453
  }
@@ -1 +1 @@
1
- export function parseKaggleTaskList(e){const t=e??{},a=(t.data??t).tasks;if(!Array.isArray(a))return[];const s=[];for(const e of a){if(!e||"object"!=typeof e)continue;const t=e;"string"==typeof t.comp_id&&""!==t.comp_id&&s.push({comp_id:t.comp_id,title:"string"==typeof t.title?t.title:t.comp_id,metric:"string"==typeof t.metric?t.metric:"accuracy",description:"string"==typeof t.description&&""!==t.description?t.description:void 0,kaggle_url:"string"==typeof t.kaggle_url?t.kaggle_url:null,licence:"string"==typeof t.licence?t.licence:void 0,attribution:"string"==typeof t.attribution?t.attribution:void 0,data_base:"string"==typeof t.data_base&&""!==t.data_base?t.data_base:null,id_col:"string"==typeof t.id_col?t.id_col:void 0,target_col:"string"==typeof t.target_col?t.target_col:void 0,n_train:"number"==typeof t.n_train?t.n_train:void 0,n_test:"number"==typeof t.n_test?t.n_test:void 0,judge:"string"==typeof t.judge&&""!==t.judge?t.judge:void 0,board_event:"string"==typeof t.board_event&&""!==t.board_event?t.board_event:null,needs_gpu:!0===t.needs_gpu})}return s}export function dataFileUrls(e){const t=e.data_base;if("string"!=typeof t||""===t)return null;const a=t.replace(/\/$/,"");return{train:`${a}/train.csv`,test:`${a}/test.csv`,sample_submission:`${a}/sample_submission.csv`}}export function buildStarterCells(e,t){const a=t.id_col??"id",s=t.target_col??"target";var r;r=t.metric,/rmse|mse|mae|error/i.test(r);const n="icoa-holdout"===t.judge,i=e=>({kind:"markdown",source:e,result:null}),o=e=>({kind:"code",source:e.join("\n"),result:null}),l=[`# ${t.title}`,"",...t.description?[t.description,""]:[],`Kaggle-style practice — metric: **${t.metric}**.`,"","- `train.csv` — labelled training data",`- \`test.csv\` — rows to predict (no \`${s}\` column)`,"- `sample_submission.csv` — the exact format Kaggle expects","","Run all cells top to bottom: a baseline model trains on your CPU and","`submission.csv` appears next to the data. Then improve the model cell",...n?["and re-run — `icoa kaggle submit` scores it and ranks you on the board."]:["and re-run — your score is whatever Kaggle says it is."],"","**AI help:** split your terminal (`Ctrl-b %`), run `icoa` in the right pane","and type `ai4ioai` for a live Gemma 3n E4B. Ask it for feature ideas or bug fixes —","then verify every suggestion with the val score. A tip that lowers it, drop it.",...t.licence?["",`**Data licence:** ${t.licence}`]:[],...t.attribution?[`**Attribution:** ${t.attribution}`]:[]].join("\n"),c=o(["# setup — load the data (leave as is)","import os","import numpy as np","import pandas as pd","from pandas.api.types import is_numeric_dtype","from sklearn.feature_extraction.text import TfidfVectorizer","from sklearn.model_selection import train_test_split","from sklearn.metrics import accuracy_score, mean_squared_error","","# same code everywhere: in a GPU session these env vars point at the","# box's own dataset copy + workspace — locally they are unset.",`DIR = os.environ.get("ICOA_KAGGLE_DATA") or r"${e}"`,'OUT = os.environ.get("ICOA_KAGGLE_OUT") or DIR',...t.data_base?[`DATA_BASE = "${t.data_base.replace(/\/$/,"")}"`,'if not os.path.exists(DIR + "/train.csv"):'," import urllib.request"," os.makedirs(DIR, exist_ok=True)",' for f in ("train.csv", "test.csv", "sample_submission.csv"):',' urllib.request.urlretrieve(DATA_BASE + "/" + f, DIR + "/" + f)']:[],'train = pd.read_csv(DIR + "/train.csv")','test = pd.read_csv(DIR + "/test.csv")','sub_fmt = pd.read_csv(DIR + "/sample_submission.csv")',"","# 🔴 The submission column names are NOT always the training column names.","# On tasks imported from other platforms the two genuinely differ: train.csv",'# labels the answer "class" or "result" while sample_submission.csv calls it','# "answer". Hard-coding the submission name here used to raise KeyError on the',"# very first cell. So trust the DATA: whatever column train has and test lacks","# is the thing to predict.",`SUB_ID, SUB_TARGET = "${a}", "${s}" # names the submission file wants`,"only_train = [c for c in train.columns if c not in test.columns]","TARGET = only_train[-1] if only_train else SUB_TARGET","shared = [c for c in train.columns if c in test.columns]","# Only treat a column as the row id when the submission actually names it AND",'# both files carry it. Falling back to "first shared column" silently spent a',"# real feature as an id on tasks whose id lives only in test.csv.","ID = SUB_ID if SUB_ID in shared else None",'assert TARGET in train.columns, f"cannot find the label column in {list(train.columns)}"',"","# Regression or classification? Decided from the labels, not from metadata —","# several tasks ship continuous labels, and handing those to a classifier",'# raises "Unknown label type: continuous".',"REG = is_numeric_dtype(train[TARGET]) and train[TARGET].nunique() > 20",'print(f"train {train.shape} · test {test.shape} · predicting {TARGET!r} "'," f\"({'regression' if REG else 'classification'})\")"]),u=o(["# FEATURES — turn raw columns into numbers a model can use (improve THIS cell).","# Numbers: fill gaps with the median. Category (<= 20 distinct): one-hot.","# Free text: TF-IDF — on a text task the sentences ARE the signal, and dropping",'# them as "high-cardinality" leaves nothing to train on (that used to crash the','# whole notebook with "No objects to concatenate").',"# only columns present in BOTH files — a train-only column cannot be a feature","# at prediction time, and indexing test with it raises KeyError.","feat = [c for c in shared if c not in (ID, TARGET)]","Xtr_raw, Xte_raw = train[feat].copy(), test[feat].copy()","num = [c for c in feat if is_numeric_dtype(Xtr_raw[c])]","cat = [c for c in feat if c not in num and Xtr_raw[c].nunique() <= 20]","# Everything else is vectorised as text. Requiring a long average length here","# used to throw away high-cardinality SHORT strings — ingredient names, single","# words, category codes — which on several tasks are the entire signal, leaving","# the notebook with zero features.","txt = [c for c in feat if c not in num and c not in cat]","for c in num:"," med = Xtr_raw[c].median()"," Xtr_raw[c] = Xtr_raw[c].fillna(med)"," Xte_raw[c] = Xte_raw[c].fillna(med)","blocks_tr, blocks_te = [], []","if num or cat:"," d_tr = pd.get_dummies(Xtr_raw[num + cat], columns=cat, dummy_na=True)"," d_te = pd.get_dummies(Xte_raw[num + cat], columns=cat, dummy_na=True)",' d_tr, d_te = d_tr.align(d_te, join="left", axis=1, fill_value=0)'," blocks_tr.append(d_tr.to_numpy(dtype=float))"," blocks_te.append(d_te.to_numpy(dtype=float))","for c in txt:"," # fillna BEFORE astype(str): a real NaN reaching the vectoriser raises",' # "np.nan is an invalid document", and astype alone does not catch it.',' tr_txt = Xtr_raw[c].fillna("").astype(str)',' te_txt = Xte_raw[c].fillna("").astype(str)'," # min_df=1: on a short-token column (one ingredient per row) min_df=2 can"," # filter the vocabulary down to nothing."," long_col = tr_txt.str.len().mean() >= 12"," # Try the good settings, then a permissive fallback, then give up on THIS"," # column only. A column whose vocabulary prunes to nothing used to abort the",' # whole run with "After pruning, no terms remain".',' for kw in ({"min_df": 2 if long_col else 1,',' "analyzer": "word" if long_col else "char_wb"},',' {"min_df": 1, "analyzer": "char_wb"}):'," try:"," vec = TfidfVectorizer(max_features=3000, ngram_range=(1, 2), **kw)"," b_tr = vec.fit_transform(tr_txt).toarray()"," blocks_tr.append(b_tr)"," blocks_te.append(vec.transform(te_txt).toarray())"," break"," except ValueError as e:"," last = e"," else:",' print(f" skipped text column {c!r}: {last}")',"if not blocks_tr:"," raise SystemExit(",' f"No usable feature columns. The shared columns are {feat} — none of them "',' f"is numeric, categorical or text.\\n"',' f"Two kinds of task land here, and both are real work rather than a bug:\\n"',' f" 1. audio/image — train.csv only lists sample ids and labels, and the "',' f"signal is in the media files shipped with the task. Load them "',' f"(librosa / PIL), turn each file into a feature row.\\n"',' f" 2. train.csv and test.csv describe different things (a retrieval or "',' f"matching task). Read both files, work out what links a test row to a "',' f"train row, and build that mapping yourself.\\n"',' f"Either way: replace this cell. train={list(train.columns)} "',' f"test={list(test.columns)}"'," )","X = np.hstack(blocks_tr)","X_test = np.hstack(blocks_te)","y = train[TARGET]","X_tr, X_val, y_tr, y_val = train_test_split(X, y, test_size=0.2, random_state=0)",'print(f"{X.shape[1]} model-ready features "',' f"({len(num)} numeric, {len(cat)} one-hot, {len(txt)} TF-IDF text)")']),d=o(["# MODEL — a working baseline. Improve THIS cell to climb the board.","from sklearn.linear_model import LogisticRegression, Ridge","# REG was decided from the labels back in setup.","model = Ridge() if REG else LogisticRegression(max_iter=2000)"]),m=o(["# validate — quick local score on a held-out fifth of train","model.fit(X_tr, y_tr)","p_val = model.predict(X_val)","if REG:",' print("val RMSE:", round(mean_squared_error(y_val, p_val) ** 0.5, 4))',"else:"," acc = accuracy_score(y_val, p_val)",' print("val accuracy:", round(acc, 4))'," if acc < 0.3:"," # A near-zero baseline is the expected result on several of these tasks,"," # not a broken notebook — say so, or the student reads it as a bug.",' print(" A score this low usually means the linear baseline cannot "',' "represent the pattern at all (combination rules, sequences, "',' "spelling). That IS the task: build features that expose it, "',' "or switch to a model that can. The chain itself works — "',' "submission.csv is written either way.")']),p=o(["# submission — retrain on ALL data, write submission.csv (Kaggle format)","model.fit(X, y)","pred = model.predict(X_test)",'out = OUT + "/submission.csv"',"# Copy the layout of sample_submission.csv and swap in the predictions, rather","# than rebuilding the file from column names. Some tasks want more than two","# columns (e.g. subtaskID,datapointID,answer) and a hand-built 2-column frame","# is rejected by the grader even when every prediction is right.","if len(sub_fmt) == len(pred):"," sub = sub_fmt.copy()"," sub[sub.columns[-1]] = pred","else:"," keys = {}"," if ID is not None and ID in test.columns:"," keys[SUB_ID] = test[ID]"," keys[SUB_TARGET] = pred"," sub = pd.DataFrame(keys)",' print(f"NOTE: sample_submission has {len(sub_fmt)} rows but test has "',' f"{len(pred)} — built the file from column names instead; "',' f"check it against the task page before submitting.")',"sub.to_csv(out, index=False)",'print("wrote", out, "·", list(sub.columns))',n?`print("score it: icoa kaggle submit ${t.comp_id}")`:'print("format check: icoa kaggle check")']),h=n?["## Submit to ICOA (scored on the server)","",`1. In the ICOA CLI run \`icoa kaggle submit ${t.comp_id}\``,"2. The server scores `submission.csv` against the secret test labels"," and your rank lands on the live board (`icoa board`).","3. Improve the MODEL cell, re-run, submit again — best score counts."]:"nitro"===t.judge?["## Where this one gets scored","","This task comes from **judge.nitro-ai.org** and the answer key stays on","their server, so ICOA cannot score it for you. That does not make it a","practice stub — it is a real task, just judged elsewhere.","",`1. \`icoa kaggle check ${t.comp_id}\` — checks the FORMAT of`," `submission.csv` (headers, row count, ids). Format errors are the most"," common way a correct answer still scores zero.","2. Watch the **val score** printed above — that is your real feedback loop"," during the sprint, and it needs no account anywhere.","3. Want the official number? Register at judge.nitro-ai.org and submit"," there. Otherwise compare against the official solution, or ask"," `ai4ioai` to review your approach."]:t.kaggle_url?["## Submit on Kaggle (manual, your own account)","",`1. Open ${t.kaggle_url}`,"2. **Submit Predictions** → upload `submission.csv`","3. Read your leaderboard score, come back, improve the MODEL cell, repeat."]:["## Submit on Kaggle (manual, your own account)","","_This dataset has no live Kaggle page linked yet._","The loop is identical: upload `submission.csv`, read the score, improve","the MODEL cell, repeat. Meanwhile the **val score** printed above is a","real signal you can work against with no account at all."];return[i(l),c,u,d,m,p,i(h.join("\n"))]}export function parseSubmitResponse(e){const t=e&&"object"==typeof e?e:{},a=t.data??t,s=a&&"object"==typeof a?a:{};return"number"==typeof s.score&&"string"==typeof s.metric?{ok:!0,score:s.score,metric:s.metric,rank:"number"==typeof s.rank_at_time?s.rank_at_time:null,fieldSize:"number"==typeof s.field_size?s.field_size:null,deduped:!0===s.deduped,boardEvent:"string"==typeof s.board_event?s.board_event:null}:"string"==typeof s.reason&&""!==s.reason?{ok:!1,reason:s.reason,error:"string"==typeof s.error?s.error:void 0,problems:Array.isArray(s.problems)?s.problems.filter(e=>"string"==typeof e):void 0}:{ok:!1,reason:"network"}}export function validateSubmissionText(e,t){const a=[],s=e.trim().split(/\r?\n/),r=t.trim().split(/\r?\n/),n=s[0]??"",i=r[0]??"";n.trim()!==i.trim()&&a.push(`header mismatch: expected "${i}", got "${n}"`);const o=s.slice(1).filter(e=>""!==e.trim()),l=r.slice(1).filter(e=>""!==e.trim());o.length!==l.length&&a.push(`row count mismatch: expected ${l.length}, got ${o.length}`);const c=e=>new Set(e.map(e=>(e.split(",")[0]??"").trim())),u=c(o),d=c(l),m=[...d].filter(e=>!u.has(e)),p=[...u].filter(e=>!d.has(e));if(m.length>0||p.length>0){const e=[];m.length>0&&e.push(`${m.length} missing (e.g. ${m[0]})`),p.length>0&&e.push(`${p.length} unknown (e.g. ${p[0]})`),a.push(`id mismatch vs sample_submission: ${e.join(", ")}`)}for(let e=0;e<o.length;e++)if(o[e].split(",").some(e=>""===e.trim())){a.push(`empty cell in data row ${e+1}`);break}return{ok:0===a.length,problems:a}}
1
+ import{sprintTaskForComp as e}from"./sprint-meta.js";export function parseKaggleTaskList(e){const t=e??{},a=(t.data??t).tasks;if(!Array.isArray(a))return[];const i=[];for(const e of a){if(!e||"object"!=typeof e)continue;const t=e;"string"==typeof t.comp_id&&""!==t.comp_id&&i.push({comp_id:t.comp_id,title:"string"==typeof t.title?t.title:t.comp_id,metric:"string"==typeof t.metric?t.metric:"accuracy",description:"string"==typeof t.description&&""!==t.description?t.description:void 0,kaggle_url:"string"==typeof t.kaggle_url?t.kaggle_url:null,licence:"string"==typeof t.licence?t.licence:void 0,attribution:"string"==typeof t.attribution?t.attribution:void 0,data_base:"string"==typeof t.data_base&&""!==t.data_base?t.data_base:null,id_col:"string"==typeof t.id_col?t.id_col:void 0,target_col:"string"==typeof t.target_col?t.target_col:void 0,n_train:"number"==typeof t.n_train?t.n_train:void 0,n_test:"number"==typeof t.n_test?t.n_test:void 0,judge:"string"==typeof t.judge&&""!==t.judge?t.judge:void 0,board_event:"string"==typeof t.board_event&&""!==t.board_event?t.board_event:null,needs_gpu:!0===t.needs_gpu})}return i}export function dataFileUrls(e){const t=e.data_base;if("string"!=typeof t||""===t)return null;const a=t.replace(/\/$/,"");return{train:`${a}/train.csv`,test:`${a}/test.csv`,sample_submission:`${a}/sample_submission.csv`}}export function buildStarterCells(t,a){const i=a.id_col??"id",n=a.target_col??"target";var s;s=a.metric,/rmse|mse|mae|error/i.test(s);const r="icoa-holdout"===a.judge,o=e=>({kind:"markdown",source:e,result:null}),l=e=>({kind:"code",source:e.join("\n"),result:null}),c=[`# ${a.title}`,"",...a.description?[a.description,""]:[],`Kaggle-style practice — metric: **${a.metric}**.`,"","- `train.csv` — labelled training data",`- \`test.csv\` — rows to predict (no \`${n}\` column)`,"- `sample_submission.csv` — the exact format Kaggle expects","","Run all cells top to bottom: a baseline model trains on your CPU and","`submission.csv` appears next to the data. Then improve the model cell",...r?["and re-run — `icoa kaggle submit` scores it and ranks you on the board."]:["and re-run — your score is whatever Kaggle says it is."],"","**AI help:** split your terminal (`Ctrl-b %`), run `icoa` in the right pane","and type `ai4ioai` for a live Gemma 3n E4B. Ask it for feature ideas or bug fixes —","then verify every suggestion with the val score. A tip that lowers it, drop it.",...a.licence?["",`**Data licence:** ${a.licence}`]:[],...a.attribution?[`**Attribution:** ${a.attribution}`]:[]].join("\n"),d=l(["# setup — load the data (leave as is)","import os","import numpy as np","import pandas as pd","from pandas.api.types import is_numeric_dtype","from sklearn.feature_extraction.text import TfidfVectorizer","from sklearn.model_selection import train_test_split","from sklearn.metrics import accuracy_score, mean_squared_error","","# same code everywhere: in a GPU session these env vars point at the","# box's own dataset copy + workspace — locally they are unset.",`DIR = os.environ.get("ICOA_KAGGLE_DATA") or r"${t}"`,'OUT = os.environ.get("ICOA_KAGGLE_OUT") or DIR',...a.data_base?[`DATA_BASE = "${a.data_base.replace(/\/$/,"")}"`,'if not os.path.exists(DIR + "/train.csv"):'," import urllib.request"," os.makedirs(DIR, exist_ok=True)",' for f in ("train.csv", "test.csv", "sample_submission.csv"):',' urllib.request.urlretrieve(DATA_BASE + "/" + f, DIR + "/" + f)']:[],'train = pd.read_csv(DIR + "/train.csv")','test = pd.read_csv(DIR + "/test.csv")','sub_fmt = pd.read_csv(DIR + "/sample_submission.csv")',"","# 🔴 The submission column names are NOT always the training column names.","# On tasks imported from other platforms the two genuinely differ: train.csv",'# labels the answer "class" or "result" while sample_submission.csv calls it','# "answer". Hard-coding the submission name here used to raise KeyError on the',"# very first cell. So trust the DATA: whatever column train has and test lacks","# is the thing to predict.",`SUB_ID, SUB_TARGET = "${i}", "${n}" # names the submission file wants`,"only_train = [c for c in train.columns if c not in test.columns]","TARGET = only_train[-1] if only_train else SUB_TARGET","shared = [c for c in train.columns if c in test.columns]","# Only treat a column as the row id when the submission actually names it AND",'# both files carry it. Falling back to "first shared column" silently spent a',"# real feature as an id on tasks whose id lives only in test.csv.","ID = SUB_ID if SUB_ID in shared else None",'assert TARGET in train.columns, f"cannot find the label column in {list(train.columns)}"',"","# Regression or classification? Decided from the labels, not from metadata —","# several tasks ship continuous labels, and handing those to a classifier",'# raises "Unknown label type: continuous".',"REG = is_numeric_dtype(train[TARGET]) and train[TARGET].nunique() > 20",'print(f"train {train.shape} · test {test.shape} · predicting {TARGET!r} "'," f\"({'regression' if REG else 'classification'})\")"]),u=e(a.comp_id),m=u?.media,p="audio"===m?.kind?"scipy.io.wavfile.read(path) -> numpy, then scipy.signal for a spectrogram":"image"===m?.kind?"PIL.Image.open(path) -> numpy":"weights"===m?.kind?"torch.load(path, weights_only=True) — the model itself is the input here":"unpack the archive inside the pack, then read what is in it",h=l(["# FEATURES — turn raw columns into numbers a model can use (improve THIS cell).","# Numbers: fill gaps with the median. Category (<= 20 distinct): one-hot.","# Free text: TF-IDF — on a text task the sentences ARE the signal, and dropping",'# them as "high-cardinality" leaves nothing to train on (that used to crash the','# whole notebook with "No objects to concatenate").',"# only columns present in BOTH files — a train-only column cannot be a feature","# at prediction time, and indexing test with it raises KeyError.","feat = [c for c in shared if c not in (ID, TARGET)]","Xtr_raw, Xte_raw = train[feat].copy(), test[feat].copy()","num = [c for c in feat if is_numeric_dtype(Xtr_raw[c])]","cat = [c for c in feat if c not in num and Xtr_raw[c].nunique() <= 20]","# Everything else is vectorised as text. Requiring a long average length here","# used to throw away high-cardinality SHORT strings — ingredient names, single","# words, category codes — which on several tasks are the entire signal, leaving","# the notebook with zero features.","txt = [c for c in feat if c not in num and c not in cat]","for c in num:"," med = Xtr_raw[c].median()"," Xtr_raw[c] = Xtr_raw[c].fillna(med)"," Xte_raw[c] = Xte_raw[c].fillna(med)","blocks_tr, blocks_te = [], []","if num or cat:"," d_tr = pd.get_dummies(Xtr_raw[num + cat], columns=cat, dummy_na=True)"," d_te = pd.get_dummies(Xte_raw[num + cat], columns=cat, dummy_na=True)",' d_tr, d_te = d_tr.align(d_te, join="left", axis=1, fill_value=0)'," blocks_tr.append(d_tr.to_numpy(dtype=float))"," blocks_te.append(d_te.to_numpy(dtype=float))","for c in txt:"," # fillna BEFORE astype(str): a real NaN reaching the vectoriser raises",' # "np.nan is an invalid document", and astype alone does not catch it.',' tr_txt = Xtr_raw[c].fillna("").astype(str)',' te_txt = Xte_raw[c].fillna("").astype(str)'," # min_df=1: on a short-token column (one ingredient per row) min_df=2 can"," # filter the vocabulary down to nothing."," long_col = tr_txt.str.len().mean() >= 12"," # Try the good settings, then a permissive fallback, then give up on THIS"," # column only. A column whose vocabulary prunes to nothing used to abort the",' # whole run with "After pruning, no terms remain".',' for kw in ({"min_df": 2 if long_col else 1,',' "analyzer": "word" if long_col else "char_wb"},',' {"min_df": 1, "analyzer": "char_wb"}):'," try:"," vec = TfidfVectorizer(max_features=3000, ngram_range=(1, 2), **kw)"," b_tr = vec.fit_transform(tr_txt).toarray()"," blocks_tr.append(b_tr)"," blocks_te.append(vec.transform(te_txt).toarray())"," break"," except ValueError as e:"," last = e"," else:",' print(f" skipped text column {c!r}: {last}")',"if not blocks_tr:"," raise SystemExit(",' f"No usable feature columns. The shared columns are {feat} — none of them "',' f"is numeric, categorical or text.\\n"',...m?[` "The signal for this task is in ${m.kind} files, not in the CSVs.\\n"`,` " 1. fetch them (${m.mb}MB): teleload ${m.pack}\\n"`,...m.glob?[` " files land at <pack dir>/${m.glob}\\n"`]:[],` " 2. replace this cell: ${p}\\n"`,' " build one feature row per file, then keep the rest of the notebook.\\n"']:[' f"Two kinds of task land here, and both are real work rather than a bug:\\n"',' f" 1. audio/image — train.csv only lists sample ids and labels and the "',' f"signal is in media files. Read them with scipy.io.wavfile (audio) or "',' f"PIL (images) and turn each file into a feature row.\\n"',' f" 2. train.csv and test.csv describe different things (a retrieval or "',' f"matching task). Read both files, work out what links a test row to a "',' f"train row, and build that mapping yourself.\\n"'],...m?[' f"columns — train={list(train.columns)} test={list(test.columns)}"']:[' f"Either way: replace this cell. train={list(train.columns)} "',' f"test={list(test.columns)}"']," )","X = np.hstack(blocks_tr)","X_test = np.hstack(blocks_te)","y = train[TARGET]","X_tr, X_val, y_tr, y_val = train_test_split(X, y, test_size=0.2, random_state=0)",'print(f"{X.shape[1]} model-ready features "',' f"({len(num)} numeric, {len(cat)} one-hot, {len(txt)} TF-IDF text)")']),f=l(["# MODEL — a working baseline. Improve THIS cell to climb the board.","from sklearn.linear_model import LogisticRegression, Ridge","# REG was decided from the labels back in setup.","model = Ridge() if REG else LogisticRegression(max_iter=2000)"]),g=l(["# validate — quick local score on a held-out fifth of train","model.fit(X_tr, y_tr)","p_val = model.predict(X_val)","if REG:",' print("val RMSE:", round(mean_squared_error(y_val, p_val) ** 0.5, 4))',"else:"," acc = accuracy_score(y_val, p_val)",' print("val accuracy:", round(acc, 4))'," if acc < 0.3:"," # A near-zero baseline is the expected result on several of these tasks,"," # not a broken notebook — say so, or the student reads it as a bug.",' print(" A score this low usually means the linear baseline cannot "',' "represent the pattern at all (combination rules, sequences, "',' "spelling). That IS the task: build features that expose it, "',' "or switch to a model that can. The chain itself works — "',' "submission.csv is written either way.")']),_=l(["# submission — retrain on ALL data, write submission.csv (Kaggle format)","model.fit(X, y)","pred = model.predict(X_test)",'out = OUT + "/submission.csv"',"# Copy the layout of sample_submission.csv and swap in the predictions, rather","# than rebuilding the file from column names. Some tasks want more than two","# columns (e.g. subtaskID,datapointID,answer) and a hand-built 2-column frame","# is rejected by the grader even when every prediction is right.","if len(sub_fmt) == len(pred):"," sub = sub_fmt.copy()"," sub[sub.columns[-1]] = pred","else:"," keys = {}"," if ID is not None and ID in test.columns:"," keys[SUB_ID] = test[ID]"," keys[SUB_TARGET] = pred"," sub = pd.DataFrame(keys)",' print(f"NOTE: sample_submission has {len(sub_fmt)} rows but test has "',' f"{len(pred)} — built the file from column names instead; "',' f"check it against the task page before submitting.")',"sub.to_csv(out, index=False)",'print("wrote", out, "·", list(sub.columns))',r?`print("score it: icoa kaggle submit ${a.comp_id}")`:'print("format check: icoa kaggle check")']),b=r?["## Submit to ICOA (scored on the server)","",`1. In the ICOA CLI run \`icoa kaggle submit ${a.comp_id}\``,"2. The server scores `submission.csv` against the secret test labels"," and your rank lands on the live board (`icoa board`).","3. Improve the MODEL cell, re-run, submit again — best score counts."]:"nitro"===a.judge?["## Where this one gets scored","","This task comes from **judge.nitro-ai.org** and the answer key stays on","their server, so ICOA cannot score it for you. That does not make it a","practice stub — it is a real task, just judged elsewhere.","",`1. \`icoa kaggle check ${a.comp_id}\` — checks the FORMAT of`," `submission.csv` (headers, row count, ids). Format errors are the most"," common way a correct answer still scores zero.","2. Watch the **val score** printed above — that is your real feedback loop"," during the sprint, and it needs no account anywhere.","3. Want the official number? Register at judge.nitro-ai.org and submit"," there. Otherwise compare against the official solution, or ask"," `ai4ioai` to review your approach."]:a.kaggle_url?["## Submit on Kaggle (manual, your own account)","",`1. Open ${a.kaggle_url}`,"2. **Submit Predictions** → upload `submission.csv`","3. Read your leaderboard score, come back, improve the MODEL cell, repeat."]:["## Submit on Kaggle (manual, your own account)","","_This dataset has no live Kaggle page linked yet._","The loop is identical: upload `submission.csv`, read the score, improve","the MODEL cell, repeat. Meanwhile the **val score** printed above is a","real signal you can work against with no account at all."];return[o(c),d,h,f,g,_,o(b.join("\n"))]}export function parseSubmitResponse(e){const t=e&&"object"==typeof e?e:{},a=t.data??t,i=a&&"object"==typeof a?a:{};return"number"==typeof i.score&&"string"==typeof i.metric?{ok:!0,score:i.score,metric:i.metric,rank:"number"==typeof i.rank_at_time?i.rank_at_time:null,fieldSize:"number"==typeof i.field_size?i.field_size:null,deduped:!0===i.deduped,boardEvent:"string"==typeof i.board_event?i.board_event:null}:"string"==typeof i.reason&&""!==i.reason?{ok:!1,reason:i.reason,error:"string"==typeof i.error?i.error:void 0,problems:Array.isArray(i.problems)?i.problems.filter(e=>"string"==typeof e):void 0}:{ok:!1,reason:"network"}}export function validateSubmissionText(e,t){const a=[],i=e.trim().split(/\r?\n/),n=t.trim().split(/\r?\n/),s=i[0]??"",r=n[0]??"";s.trim()!==r.trim()&&a.push(`header mismatch: expected "${r}", got "${s}"`);const o=i.slice(1).filter(e=>""!==e.trim()),l=n.slice(1).filter(e=>""!==e.trim());o.length!==l.length&&a.push(`row count mismatch: expected ${l.length}, got ${o.length}`);const c=e=>new Set(e.map(e=>(e.split(",")[0]??"").trim())),d=c(o),u=c(l),m=[...u].filter(e=>!d.has(e)),p=[...d].filter(e=>!u.has(e));if(m.length>0||p.length>0){const e=[];m.length>0&&e.push(`${m.length} missing (e.g. ${m[0]})`),p.length>0&&e.push(`${p.length} unknown (e.g. ${p[0]})`),a.push(`id mismatch vs sample_submission: ${e.join(", ")}`)}for(let e=0;e<o.length;e++)if(o[e].split(",").some(e=>""===e.trim())){a.push(`empty cell in data row ${e+1}`);break}return{ok:0===a.length,problems:a}}
@@ -0,0 +1,54 @@
1
+ /** Media a task needs that its CSV three-pack does not carry. */
2
+ export interface SprintMedia {
3
+ /** what the files are — decides which library the guidance names */
4
+ kind: 'audio' | 'image' | 'weights' | 'archive';
5
+ /** teleload pack id (also the folder it unpacks into) */
6
+ pack: string;
7
+ /** unpacked size, MB — from the live teleload manifest at authoring time */
8
+ mb: number;
9
+ /** where the files sit inside the pack, for the "replace this cell" hint */
10
+ glob?: string;
11
+ }
12
+ export interface SprintTaskMeta {
13
+ seq: number;
14
+ bullseye: string;
15
+ title: string;
16
+ platform: string;
17
+ difficulty: number;
18
+ data_mb: number;
19
+ needs_gpu: boolean;
20
+ cli_mode: string;
21
+ dir?: string;
22
+ topic_cn?: string;
23
+ comp?: string | null;
24
+ judged?: boolean;
25
+ status?: string;
26
+ /**
27
+ * What `run all` prints on the shipped starter, measured by actually running
28
+ * every notebook (not read off the code). `'none'` = it stops before scoring.
29
+ * `'pack'` = the teleload pack ships its own baseline notebook.
30
+ */
31
+ baseline?: string;
32
+ media?: SprintMedia;
33
+ }
34
+ /** Data files live next to the built JS (copied by the build), fall back to repo layout. */
35
+ export declare function sprintDataPath(name: string): string;
36
+ export declare function loadSprintTasks(): SprintTaskMeta[];
37
+ /** Look a task up by the competition id the student types (`s01-sound-of-nature`). */
38
+ export declare function sprintTaskForComp(comp: string | null | undefined): SprintTaskMeta | null;
39
+ /**
40
+ * The commands to type, in order. A media task is TWO steps and the media comes
41
+ * first — pulling the CSVs first only to hit a wall in cell 3 is the dead end
42
+ * this function exists to remove.
43
+ */
44
+ export declare function taskSteps(t: SprintTaskMeta): string[];
45
+ /** One-line answer to "will `run all` give me a number?" */
46
+ export declare function baselineChip(t: SprintTaskMeta, zh: boolean): string;
47
+ /** `💻 CPU 可做` / `⚡ 需 GPU · 晚场` — decides what a student can do right now. */
48
+ export declare function computeChip(t: SprintTaskMeta, zh: boolean): string;
49
+ /**
50
+ * The media block: what is missing, the command that fetches it, and the first
51
+ * line of code that reads it. Used by the download guide AND baked into the
52
+ * starter notebook's stop message, so the two can never disagree.
53
+ */
54
+ export declare function mediaHelpLines(t: SprintTaskMeta, zh: boolean): string[];
@@ -0,0 +1 @@
1
+ import{existsSync as e,readFileSync as t}from"node:fs";import{dirname as n,join as i}from"node:path";import{fileURLToPath as o}from"node:url";const a=n(o(import.meta.url));export function sprintDataPath(t){const n=[i(a,"..","data",t),i(a,"..","..","src","data",t)];for(const t of n)if(e(t))return t;return n[0]}let r=null;export function loadSprintTasks(){if(r)return r;try{const e=JSON.parse(t(sprintDataPath("sprint-tasks.json"),"utf8"));r=Array.isArray(e?.tasks)?e.tasks.slice().sort((e,t)=>e.seq-t.seq):[]}catch{r=[]}return r}export function sprintTaskForComp(e){if(!e)return null;const t=e.trim().toLowerCase();return loadSprintTasks().find(e=>(e.comp||"").toLowerCase()===t)??null}export function taskSteps(e){const t=[];return e.media&&t.push(`teleload ${e.media.pack}`),"teleload"===e.status?t.length>0?t:[`teleload ${e.comp??""}`.trim()]:(e.comp&&t.push(`kaggle ${e.comp}`),t)}export function baselineChip(e,t){const n=(e.baseline||"").trim();if(!n)return"";if("none"===n)return t?"📊 无 baseline — 特征要你自己建(见下)":"📊 no baseline — you build the features (below)";if("pack"===n)return t?"📊 官方 baseline.ipynb 在数据包里":"📊 the pack ships the official baseline.ipynb";const i=t?`📊 开箱 baseline ${n}`:`📊 out-of-the-box baseline ${n}`;return/\b0\.(0\d|1\d|2\d)/.test(n)||/\b0\.000/.test(n)?i+(t?" — 线性模型对这题本就无效,不是坏了":" — a linear model cannot express this task; not a bug"):i}export function computeChip(e,t){return e.needs_gpu?t?"⚡ 需 GPU · 排晚场":"⚡ needs GPU · evening window":t?"💻 CPU 可做 · 现在就能开":"💻 CPU is enough · start now"}function s(e,t){switch(e){case"audio":return t?"本机 aienv:scipy.io.wavfile.read → numpy → scipy.signal 求谱(没有 librosa)· GPU 箱上 librosa/torchaudio 都有":"on your laptop: scipy.io.wavfile.read → numpy → scipy.signal (no librosa here) · on the GPU box librosa/torchaudio both exist";case"image":return t?"PIL.Image.open 读图 → numpy":"PIL.Image.open → numpy";case"weights":return t?"torch.load(..., weights_only=True) 读权重(输入就是模型)":"torch.load(..., weights_only=True) — the model IS the input here";default:return t?"先解开包里的压缩档再读":"unpack the archive inside the pack first"}}export function mediaHelpLines(e,t){const n=e.media;if(!n)return[];const i="audio"===n.kind?t?"音频":"audio":"image"===n.kind?t?"图片":"images":"weights"===n.kind?t?"模型权重":"model weights":t?"附件档":"an archive",o="none"===(e.baseline||"").trim()?t?`⚠ 这题的信号在${i}里,CSV 只有 id 和标签 —— 通用 starter 会在第 3 格停下。`:`⚠ The signal is in the ${i}; the CSVs carry only ids and labels — the generic starter stops at cell 3.`:t?`⚠ 真信号在${i}里。只喂 CSV 也能跑完,但分数接近瞎猜(${e.baseline})。`:`⚠ The real signal is in the ${i}. CSV-only does finish, but scores near chance (${e.baseline}).`;return t?[o,`▸ 先拉数据(${n.mb}MB):teleload ${n.pack}`,`▸ 然后把 FEATURES 那一格换成:${s(n.kind,!0)}`,...n.glob?[` 文件在 <数据目录>/${n.glob}`]:[]]:[o,`▸ Pull it first (${n.mb}MB): teleload ${n.pack}`,`▸ Then replace the FEATURES cell: ${s(n.kind,!1)}`,...n.glob?[` files live at <data dir>/${n.glob}`]:[]]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.447",
3
+ "version": "2.19.449",
4
4
  "description": "ICOA CLI — The world's first CLI-native cyber & AI security olympiad terminal: AI4CTF (Day 1), CTF4AI (Day 2), VLA4CTF (Pioneer Round — embodied AI)",
5
5
  "type": "module",
6
6
  "bin": {