Spaces:
Runtime error
Runtime error
Merge pull request #9 from AnujPanthri/train
Browse files
.github/workflows/kaggle.yaml
CHANGED
@@ -17,6 +17,7 @@ jobs:
|
|
17 |
with:
|
18 |
fetch-depth: 0
|
19 |
lfs: true
|
|
|
20 |
|
21 |
- name: Setup Kaggle
|
22 |
run: |
|
|
|
17 |
with:
|
18 |
fetch-depth: 0
|
19 |
lfs: true
|
20 |
+
ref: ${{ github.head_ref || github.ref_name }}
|
21 |
|
22 |
- name: Setup Kaggle
|
23 |
run: |
|
configs/experiment1.yaml
CHANGED
@@ -7,10 +7,12 @@ model: model_v1
|
|
7 |
seed: 324
|
8 |
train_size: 0.8
|
9 |
# image_size: 224
|
10 |
-
image_size: 64
|
|
|
11 |
shuffle: False
|
12 |
|
13 |
# training related
|
14 |
batch_size: 16
|
15 |
-
|
16 |
-
epochs:
|
|
|
|
7 |
seed: 324
|
8 |
train_size: 0.8
|
9 |
# image_size: 224
|
10 |
+
# image_size: 64
|
11 |
+
image_size: 128
|
12 |
shuffle: False
|
13 |
|
14 |
# training related
|
15 |
batch_size: 16
|
16 |
+
epochs: 50
|
17 |
+
# epochs: 20
|
18 |
+
# epochs: 02
|
kaggle/train-image-colorization.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:35.423893Z","iopub.status.busy":"2024-05-07T05:57:35.422571Z","iopub.status.idle":"2024-05-07T05:57:37.744423Z","shell.execute_reply":"2024-05-07T05:57:37.743082Z","shell.execute_reply.started":"2024-05-07T05:57:35.423838Z"},"trusted":true},"outputs":[],"source":["!git clone https://github.com/AnujPanthri/Image-Colorization.git\n","%cd Image-Colorization"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:38.983147Z","iopub.status.busy":"2024-05-07T05:57:38.982736Z","iopub.status.idle":"2024-05-07T05:57:38.989575Z","shell.execute_reply":"2024-05-07T05:57:38.987925Z","shell.execute_reply.started":"2024-05-07T05:57:38.983115Z"},"trusted":true},"outputs":[],"source":["# %cd ..\n","# !rm -r Image-Colorization"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:39.454828Z","iopub.status.busy":"2024-05-07T05:57:39.454444Z","iopub.status.idle":"2024-05-07T05:58:13.154377Z","shell.execute_reply":"2024-05-07T05:58:13.152964Z","shell.execute_reply.started":"2024-05-07T05:57:39.4548Z"},"trusted":true},"outputs":[],"source":["!pip install -r requirements.txt --quiet\n","!pip install -e ."]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:13.15798Z","iopub.status.busy":"2024-05-07T05:58:13.157513Z","iopub.status.idle":"2024-05-07T05:58:14.401676Z","shell.execute_reply":"2024-05-07T05:58:14.400055Z","shell.execute_reply.started":"2024-05-07T05:58:13.157935Z"},"trusted":true},"outputs":[],"source":["from kaggle_secrets import UserSecretsClient\n","user_secrets = UserSecretsClient()\n","COMET_API_KEY = user_secrets.get_secret(\"comet_api_key\")\n","\n","# !export COMET_API_KEY={COMET_API_KEY}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:14.412388Z","iopub.status.busy":"2024-05-07T05:58:14.412023Z","iopub.status.idle":"2024-05-07T05:58:14.422002Z","shell.execute_reply":"2024-05-07T05:58:14.420946Z","shell.execute_reply.started":"2024-05-07T05:58:14.41236Z"},"trusted":true},"outputs":[],"source":["import os\n","\n","os.environ[\"COMET_API_KEY\"]=COMET_API_KEY\n","config_file = \"configs/experiment1.yaml\""]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:14.423858Z","iopub.status.busy":"2024-05-07T05:58:14.423359Z","iopub.status.idle":"2024-05-07T05:58:20.695681Z","shell.execute_reply":"2024-05-07T05:58:20.694312Z","shell.execute_reply.started":"2024-05-07T05:58:14.423828Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/prepare_dataset.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:20.697948Z","iopub.status.busy":"2024-05-07T05:58:20.697592Z","iopub.status.idle":"2024-05-07T05:58:20.703728Z","shell.execute_reply":"2024-05-07T05:58:20.702527Z","shell.execute_reply.started":"2024-05-07T05:58:20.697915Z"},"trusted":true},"outputs":[],"source":["# !cat src/utils/data_utils.py"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:24.072758Z","iopub.status.busy":"2024-05-07T05:58:24.072343Z","iopub.status.idle":"2024-05-07T05:58:27.518713Z","shell.execute_reply":"2024-05-07T05:58:27.517194Z","shell.execute_reply.started":"2024-05-07T05:58:24.072725Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/visualize_dataset.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:41.523718Z","iopub.status.busy":"2024-05-07T05:58:41.523307Z","iopub.status.idle":"2024-05-07T06:03:03.088039Z","shell.execute_reply":"2024-05-07T06:03:03.086519Z","shell.execute_reply.started":"2024-05-07T05:58:41.523683Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/train.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T06:03:34.595185Z","iopub.status.busy":"2024-05-07T06:03:34.594725Z","iopub.status.idle":"2024-05-07T06:03:46.842693Z","shell.execute_reply":"2024-05-07T06:03:46.841521Z","shell.execute_reply.started":"2024-05-07T06:03:34.595147Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/visualize_results.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["%cd ..\n","\n","! cp -r Image-Colorization/artifacts .\n","! rm -r artifacts/model/\n","! rm -r Image-Colorization\n","! ls"]}],"metadata":{"kaggle":{"accelerator":"none","dataSources":[],"dockerImageVersionId":30698,"isGpuEnabled":false,"isInternetEnabled":true,"language":"python","sourceType":"notebook"},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.1"}},"nbformat":4,"nbformat_minor":4}
|
|
|
1 |
+
{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:35.423893Z","iopub.status.busy":"2024-05-07T05:57:35.422571Z","iopub.status.idle":"2024-05-07T05:57:37.744423Z","shell.execute_reply":"2024-05-07T05:57:37.743082Z","shell.execute_reply.started":"2024-05-07T05:57:35.423838Z"},"trusted":true},"outputs":[],"source":["!git clone https://github.com/AnujPanthri/Image-Colorization.git\n","%cd Image-Colorization\n","!git checkout train"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:38.983147Z","iopub.status.busy":"2024-05-07T05:57:38.982736Z","iopub.status.idle":"2024-05-07T05:57:38.989575Z","shell.execute_reply":"2024-05-07T05:57:38.987925Z","shell.execute_reply.started":"2024-05-07T05:57:38.983115Z"},"trusted":true},"outputs":[],"source":["# %cd ..\n","# !rm -r Image-Colorization"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:57:39.454828Z","iopub.status.busy":"2024-05-07T05:57:39.454444Z","iopub.status.idle":"2024-05-07T05:58:13.154377Z","shell.execute_reply":"2024-05-07T05:58:13.152964Z","shell.execute_reply.started":"2024-05-07T05:57:39.4548Z"},"trusted":true},"outputs":[],"source":["!pip install -r requirements.txt --quiet\n","!pip install -e ."]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:13.15798Z","iopub.status.busy":"2024-05-07T05:58:13.157513Z","iopub.status.idle":"2024-05-07T05:58:14.401676Z","shell.execute_reply":"2024-05-07T05:58:14.400055Z","shell.execute_reply.started":"2024-05-07T05:58:13.157935Z"},"trusted":true},"outputs":[],"source":["from kaggle_secrets import UserSecretsClient\n","user_secrets = UserSecretsClient()\n","COMET_API_KEY = user_secrets.get_secret(\"comet_api_key\")\n","\n","# !export COMET_API_KEY={COMET_API_KEY}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:14.412388Z","iopub.status.busy":"2024-05-07T05:58:14.412023Z","iopub.status.idle":"2024-05-07T05:58:14.422002Z","shell.execute_reply":"2024-05-07T05:58:14.420946Z","shell.execute_reply.started":"2024-05-07T05:58:14.41236Z"},"trusted":true},"outputs":[],"source":["import os\n","\n","os.environ[\"COMET_API_KEY\"]=COMET_API_KEY\n","config_file = \"configs/experiment1.yaml\""]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:14.423858Z","iopub.status.busy":"2024-05-07T05:58:14.423359Z","iopub.status.idle":"2024-05-07T05:58:20.695681Z","shell.execute_reply":"2024-05-07T05:58:20.694312Z","shell.execute_reply.started":"2024-05-07T05:58:14.423828Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/prepare_dataset.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:20.697948Z","iopub.status.busy":"2024-05-07T05:58:20.697592Z","iopub.status.idle":"2024-05-07T05:58:20.703728Z","shell.execute_reply":"2024-05-07T05:58:20.702527Z","shell.execute_reply.started":"2024-05-07T05:58:20.697915Z"},"trusted":true},"outputs":[],"source":["# !cat src/utils/data_utils.py"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:24.072758Z","iopub.status.busy":"2024-05-07T05:58:24.072343Z","iopub.status.idle":"2024-05-07T05:58:27.518713Z","shell.execute_reply":"2024-05-07T05:58:27.517194Z","shell.execute_reply.started":"2024-05-07T05:58:24.072725Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/visualize_dataset.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T05:58:41.523718Z","iopub.status.busy":"2024-05-07T05:58:41.523307Z","iopub.status.idle":"2024-05-07T06:03:03.088039Z","shell.execute_reply":"2024-05-07T06:03:03.086519Z","shell.execute_reply.started":"2024-05-07T05:58:41.523683Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/train.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{"execution":{"iopub.execute_input":"2024-05-07T06:03:34.595185Z","iopub.status.busy":"2024-05-07T06:03:34.594725Z","iopub.status.idle":"2024-05-07T06:03:46.842693Z","shell.execute_reply":"2024-05-07T06:03:46.841521Z","shell.execute_reply.started":"2024-05-07T06:03:34.595147Z"},"trusted":true},"outputs":[],"source":["!python3 src/scripts/visualize_results.py {config_file}"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["%cd ..\n","\n","! cp -r Image-Colorization/artifacts .\n","! rm -r artifacts/model/\n","! rm -r Image-Colorization\n","! ls"]}],"metadata":{"kaggle":{"accelerator":"none","dataSources":[],"dockerImageVersionId":30698,"isGpuEnabled":false,"isInternetEnabled":true,"language":"python","sourceType":"notebook"},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.1"}},"nbformat":4,"nbformat_minor":4}
|