{"task": {"agent_timeout": 1800, "task": "911", "verifier_timeout": 1800, "instruction": "# 911: DS-1000 Task\n\n## Prompt\nProblem:\n\nI am trying to run an Elastic Net regression but get the following error: NameError: name 'sklearn' is not defined... any help is greatly appreciated!\n\n    # ElasticNet Regression\n\n    from sklearn import linear_model\n    import statsmodels.api as sm\n\n    ElasticNet = sklearn.linear_model.ElasticNet() # create a lasso instance\n    ElasticNet.fit(X_train, y_train) # fit data\n\n    # print(lasso.coef_)\n    # print (lasso.intercept_) # print out the coefficients\n\n    print (\"R^2 for training set:\"),\n    print (ElasticNet.score(X_train, y_train))\n\n    print ('-'*50)\n\n    print (\"R^2 for test set:\"),\n    print (ElasticNet.score(X_test, y_test))\n\nA:\n\ncorrected code\n<code>\nimport numpy as np\nimport pandas as pd\nfrom sklearn import linear_model\nimport statsmodels.api as sm\nX_train, y_train, X_test, y_test = load_data()\nassert type(X_train) == np.ndarray\nassert type(y_train) == np.ndarray\nassert type(X_test) == np.ndarray\nassert type(y_test) == np.ndarray\n</code>\ntraining_set_score, test_set_score = ... # put solution in these variables\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": []}