Rows commited on
Commit
1e1cf93
·
verified ·
1 Parent(s): 33a83b3

Add SAIR smoke-test model

Browse files
Files changed (3) hide show
  1. README.md +10 -3
  2. manifest.json +7 -0
  3. model.py +20 -0
README.md CHANGED
@@ -1,3 +1,10 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
1
+ # Smoke-test model for SAIR Modular Arithmetic Challenge
2
+
3
+ This repository contains a minimal smoke-test submission for the SAIR Modular Arithmetic Challenge.
4
+
5
+ It is intended to validate the submission pipeline only. The model always emits `[0]` as a base-10 digit list and is not a competitive model.
6
+
7
+ Files:
8
+
9
+ - `manifest.json`: submission manifest
10
+ - `model.py`: `SmokeZeroModel` implementation
manifest.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "entry_class": "model.SmokeZeroModel",
3
+ "output_base": 10,
4
+ "framework": "pytorch",
5
+ "model_description": "Smoke-test constant predictor for the SAIR Modular Arithmetic Challenge. It emits one base-10 digit, 0, for every input and is intended only to validate the end-to-end submission pipeline.",
6
+ "training_description": "No training was performed. This repository is a pipeline smoke test, not a competitive model."
7
+ }
model.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from modchallenge.interface.base_model import ModularMultiplicationModel
4
+
5
+
6
+ class SmokeZeroModel(ModularMultiplicationModel):
7
+ def load(self, model_dir: str) -> None:
8
+ return None
9
+
10
+ def preprocess_a(self, a: str) -> str:
11
+ return a
12
+
13
+ def preprocess_b(self, b: str) -> str:
14
+ return b
15
+
16
+ def preprocess_p(self, p: str) -> str:
17
+ return p
18
+
19
+ def predict_digits(self, a_enc: str, b_enc: str, p_enc: str) -> list[int]:
20
+ return [0]