{"task": {"agent_timeout": 1800, "task": "688", "verifier_timeout": 1800, "instruction": "# 688: DS-1000 Task\n\n## Prompt\nProblem:\nI'm using tensorflow 2.10.0.\nI have two embeddings tensor A and B, which looks like\n[\n  [1,1,1],\n  [1,1,1]\n]\n\n\nand \n[\n  [0,0,0],\n  [1,1,1]\n]\n\n\nwhat I want to do is calculate the L2 distance d(A,B) element-wise. \nFirst I did a tf.square(tf.sub(lhs, rhs)) to get\n[\n  [1,1,1],\n  [0,0,0]\n]\n\n\nand then I want to do an element-wise reduce which returns \n[\n  3,\n  0\n]\n\n\nbut tf.reduce_sum does not allow my to reduce by row. Any inputs would be appreciated. Thanks.\n\n\nA:\n<code>\nimport tensorflow as tf\n\n\na = tf.constant([\n  [1,1,1],\n  [1,1,1]\n])\nb = tf.constant([\n  [0,0,0],\n  [1,1,1]\n])\n</code>\nresult = ... # put solution in this variable\nBEGIN SOLUTION\n<code>\n\n## What to do\n- Edit `solution/solution.py` so the code passes the DS-1000 tests.\n- Do not access the internet or install new packages; required libraries are preinstalled in the Docker image.\n- Run tests locally via `bash tests/test.sh`.\n\n## Notes\n- Keep the variable names/signatures implied by the prompt/code_context.\n- The evaluator uses the original DS-1000 `code_context` (`test_execution` / `test_string`).\n", "memory": "", "runnable": false, "difficulty": "", "language": "", "cpus": "", "instruction_truncated": false, "category": "", "compose": false, "has_solution": true, "oracle": null, "docker_image": "ds1000:latest", "taskset": "ds1000", "tags": []}, "runs": []}