{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\n\nPROJECT_DATA_DIR = \"../fgcvprojectdatax\"\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"daa5b7cf-4f2b-46e9-a216-8e97905086b5","_cell_guid":"037482bd-8435-4e8a-97e3-3fa12bd4d9c0","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:20.374149Z","iopub.execute_input":"2022-05-25T14:00:20.374465Z","iopub.status.idle":"2022-05-25T14:00:20.398847Z","shell.execute_reply.started":"2022-05-25T14:00:20.374404Z","shell.execute_reply":"2022-05-25T14:00:20.398256Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input","metadata":{"_uuid":"c9e9a935-9247-409a-805f-1ca565882c8f","_cell_guid":"26dbebda-a054-4f1b-8996-90dd6db4dec3","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:20.401954Z","iopub.execute_input":"2022-05-25T14:00:20.402132Z","iopub.status.idle":"2022-05-25T14:00:21.061645Z","shell.execute_reply.started":"2022-05-25T14:00:20.402111Z","shell.execute_reply":"2022-05-25T14:00:21.060727Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input\n!ls ../input/fgcvprojectdatax\n!cp -r ../input/fgcvprojectdatax/nils-utils .\n!cp -r ../input/fgcvprojectdatax/wheelhouse .\n!cp -r ../input/fgcvprojectdatax/requirements.txt .\n!cp -r ../input/fgcvprojectdatax/mlip_challenge_2/* .\n!cp -r ../input/fgcvprojectdatax/models .\n!cp -r ../input/fgcvprojectdatax/rotation_model .","metadata":{"_uuid":"64fdc020-94b3-42a7-9178-415941b17730","_cell_guid":"a1c71735-782b-44d5-a9af-c90276a4fc57","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:21.063806Z","iopub.execute_input":"2022-05-25T14:00:21.064071Z","iopub.status.idle":"2022-05-25T14:00:40.464544Z","shell.execute_reply.started":"2022-05-25T14:00:21.064035Z","shell.execute_reply":"2022-05-25T14:00:40.46362Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!python -V","metadata":{"_uuid":"58b2e092-0bd3-47e2-8c8a-1af0c8bad96c","_cell_guid":"f0ba7015-4bdf-4575-a457-42bb1026cd69","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:40.467897Z","iopub.execute_input":"2022-05-25T14:00:40.468169Z","iopub.status.idle":"2022-05-25T14:00:41.14111Z","shell.execute_reply.started":"2022-05-25T14:00:40.468145Z","shell.execute_reply":"2022-05-25T14:00:41.140248Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls .\n!du -hs ../input/fgcvprojectdatax\n!cat requirements.txt","metadata":{"_uuid":"07169925-b7b0-4ae4-b6c8-56cb0170ec0b","_cell_guid":"e6a78638-1f0b-44c6-9339-32cee11fe236","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:41.144487Z","iopub.execute_input":"2022-05-25T14:00:41.14516Z","iopub.status.idle":"2022-05-25T14:00:43.402658Z","shell.execute_reply.started":"2022-05-25T14:00:41.145119Z","shell.execute_reply":"2022-05-25T14:00:43.401889Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# !pip install timm\n# !pip install git+https://github.com/NilsHasNoGithub/nils-utils\n# !pip install icecream\n# !pip install ray\n!pip install -r requirements.txt --no-index --find-links wheelhouse\nimport sys\nimport os\nsys.path.append(os.path.abspath(\"./nils-utils\"))\n# sys.path.append(\"./mlip_challenge_2\")","metadata":{"_uuid":"fe7a2f9a-a40c-4b36-92df-87dc3f6f3a17","_cell_guid":"81570cd7-0033-42fc-a165-8016896d3b4f","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:43.404246Z","iopub.execute_input":"2022-05-25T14:00:43.404862Z","iopub.status.idle":"2022-05-25T14:00:53.629642Z","shell.execute_reply.started":"2022-05-25T14:00:43.404823Z","shell.execute_reply":"2022-05-25T14:00:53.628817Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip freeze | grep torch","metadata":{"_uuid":"77fcdf61-41e0-458d-87c8-8ecc0cbcf823","_cell_guid":"b03e32c8-0920-4dbb-a815-b95f8d162fff","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-25T14:00:53.633107Z","iopub.execute_input":"2022-05-25T14:00:53.633321Z","iopub.status.idle":"2022-05-25T14:00:56.814428Z","shell.execute_reply.started":"2022-05-25T14:00:53.633297Z","shell.execute_reply":"2022-05-25T14:00:56.813546Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!echo\n!ls models","metadata":{"execution":{"iopub.status.busy":"2022-05-25T14:00:56.818704Z","iopub.execute_input":"2022-05-25T14:00:56.819041Z","iopub.status.idle":"2022-05-25T14:00:58.123676Z","shell.execute_reply.started":"2022-05-25T14:00:56.819009Z","shell.execute_reply":"2022-05-25T14:00:58.122926Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls nils-utils\nprint(sys.path)\nimport nils_utils\n","metadata":{"execution":{"iopub.status.busy":"2022-05-25T14:00:58.126706Z","iopub.execute_input":"2022-05-25T14:00:58.126931Z","iopub.status.idle":"2022-05-25T14:00:58.81219Z","shell.execute_reply.started":"2022-05-25T14:00:58.126906Z","shell.execute_reply":"2022-05-25T14:00:58.811419Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir -p data\n!ln -s $(realpath ../input/hotel-id-to-combat-human-trafficking-2022-fgvc9) ./data\n!ls data","metadata":{"execution":{"iopub.status.busy":"2022-05-25T14:00:58.813676Z","iopub.execute_input":"2022-05-25T14:00:58.813954Z","iopub.status.idle":"2022-05-25T14:01:00.914871Z","shell.execute_reply.started":"2022-05-25T14:00:58.813919Z","shell.execute_reply":"2022-05-25T14:01:00.913884Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cat configurations/inference/efficient_net_m_finetuned_rotcor.yml","metadata":{"execution":{"iopub.status.busy":"2022-05-25T14:01:00.917879Z","iopub.execute_input":"2022-05-25T14:01:00.918179Z","iopub.status.idle":"2022-05-25T14:01:01.572624Z","shell.execute_reply.started":"2022-05-25T14:01:00.91814Z","shell.execute_reply":"2022-05-25T14:01:01.571854Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import predict\n\npredict.make_predictions(\n    \"../input/hotel-id-to-combat-human-trafficking-2022-fgvc9/test_images\",\n    \"configurations/inference/efficient_net_m_no_pretrain.yml\",\n    \"train_metadata.yml\",\n    \"submission.csv\"\n)","metadata":{"_uuid":"175b320a-1e7a-493f-9c6e-5db384c937c7","_cell_guid":"98e57f56-7af3-4eb1-ae3d-a6e901f461bf","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-17T01:06:02.153811Z","iopub.execute_input":"2022-05-17T01:06:02.154543Z","iopub.status.idle":"2022-05-17T01:06:44.320268Z","shell.execute_reply.started":"2022-05-17T01:06:02.1545Z","shell.execute_reply":"2022-05-17T01:06:44.318957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cat submission.csv","metadata":{"_uuid":"50a62efc-af08-4b5c-9fb2-73009acf6395","_cell_guid":"c619bda7-7947-46a5-953b-1c34cc66a7af","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2022-05-18T13:38:53.208949Z","iopub.execute_input":"2022-05-18T13:38:53.209291Z","iopub.status.idle":"2022-05-18T13:38:53.92216Z","shell.execute_reply.started":"2022-05-18T13:38:53.209245Z","shell.execute_reply":"2022-05-18T13:38:53.921057Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"_uuid":"bf56d46a-75fa-47c5-9c2f-3b4d866e7c47","_cell_guid":"3f0986f6-e816-40b2-9d9d-1c91084b3acb","collapsed":false,"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]}]}