|
48 | 48 | " - Your notebook must output test set predictions to `submission.csv` in the correct format\n", |
49 | 49 | " - Go to 'Submit to competition' tab in the right sidebar and click 'Submit'\n", |
50 | 50 | "\n", |
51 | | - "**Note:** This notebook uses a `KAGGLE` flag (under 'Run configuration') to switch between Kaggle and local file paths. Set it to `True` when running on Kaggle, or `False` when running locally with data in a `../data/` directory.\n", |
| 51 | + "You may see warnings when running on Kaggle due to inconsistencies in installed package versions between your environment and Kaggle. If you are using a virtual environment already, install this [kaggle_requirements.txt](https://github.com/gperdrizet/FSA_devops/blob/main/notebooks/unit3/lesson_20/kaggle_requirements.txt.ipynb):\n", |
| 52 | + "\n", |
| 53 | + "```\n", |
| 54 | + "pip install --force-reinstall kaggle_requirements.txt\n", |
| 55 | + "```\n", |
| 56 | + "\n", |
| 57 | + "This is working for me with Python 3.12. It contains a slightly newer version of scikit-learn than is found on Kaggle. Update in the Kaggle environment by going to 'Add-ons' -> 'Install Dependencies' and adding:\n", |
| 58 | + "\n", |
| 59 | + "```\n", |
| 60 | + "pip install scikit-learn==1.5.2\n", |
| 61 | + "```\n", |
| 62 | + "\n", |
| 63 | + ">**Note:** This notebook uses a `KAGGLE` flag (under 'Run >configuration') to switch between Kaggle and local file paths. Set it >to `True` when running on Kaggle, or `False` when running locally.\n", |
52 | 64 | "\n", |
53 | 65 | "## Notebook set-up\n", |
54 | 66 | "\n", |
|
122 | 134 | }, |
123 | 135 | { |
124 | 136 | "cell_type": "code", |
125 | | - "execution_count": 3, |
| 137 | + "execution_count": null, |
126 | 138 | "id": "d1a2421c", |
127 | 139 | "metadata": { |
128 | 140 | "execution": { |
|
358 | 370 | "source": [ |
359 | 371 | "# Set file paths based on environment\n", |
360 | 372 | "if KAGGLE:\n", |
| 373 | + "\n", |
361 | 374 | " # Kaggle paths - data is in /kaggle/input/\n", |
362 | 375 | " train_df_path = '/kaggle/input/playground-series-s5e12/train.csv'\n", |
363 | 376 | " test_df_path = '/kaggle/input/playground-series-s5e12/test.csv'\n", |
364 | 377 | "\n", |
365 | 378 | "else:\n", |
| 379 | + "\n", |
366 | 380 | " # Otherwise, load data from course GitHub repository\n", |
367 | 381 | " train_df_path = 'https://gperdrizet.github.io/FSA_devops/assets/data/unit3/diabetes_prediction_train.csv'\n", |
368 | 382 | " test_df_path = 'https://gperdrizet.github.io/FSA_devops/assets/data/unit3/diabetes_prediction_test.csv'\n", |
|
0 commit comments