Antik Khan
Add annotations
3d3ae36
Raw
History Blame Contribute Delete
2.4 kB
{
"task": {
"id": "case_102",
"name": "reflect_into_range",
"summary": "Reflects each element within a range (default is [2, 7]).",
"examples": [
{
"input": [
"BOS",
-3,
-17,
4,
-7,
-12,
5,
-19,
-1,
7
],
"output": [
"BOS",
7,
3,
4,
3,
6,
5,
3,
5,
7
]
},
{
"input": [
"BOS",
-10,
3,
15,
19,
3,
-18,
1,
-19,
3
],
"output": [
"BOS",
4,
3,
5,
5,
3,
2,
3,
3,
3
]
},
{
"input": [
"BOS",
18,
8,
-6,
-13,
0,
18,
-2,
2,
-10
],
"output": [
"BOS",
6,
6,
4,
7,
4,
6,
6,
2,
4
]
},
{
"input": [
"BOS",
9,
17,
-19,
0,
12,
-9,
1,
4,
6
],
"output": [
"BOS",
5,
7,
3,
4,
2,
3,
3,
4,
6
]
},
{
"input": [
"BOS",
7,
-5,
-6,
-18,
16,
-14,
0,
-12,
18
],
"output": [
"BOS",
7,
5,
4,
2,
6,
6,
4,
6,
6
]
}
],
"is_categorical": true
},
"program": "return rasp.Map(lambda x: reflect_into_range(max_val, min_val, x), rasp.tokens)",
"components": [
{
"id": "L0_MLP",
"hook": "blocks.0.mlp.hook_post",
"role": {
"tag": "MAPPER",
"note": "Applies a per-element reflection rule to fold values back into the target range."
},
"rasp_vars": [
"reflected_sequence"
],
"labels": [
"map_1"
]
}
]
}