{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":70203,"databundleVersionId":8068726,"sourceType":"competition"},{"sourceId":183102636,"sourceType":"kernelVersion"}],"dockerImageVersionId":30732,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"! git config --global advice.detachedHead false\n# main repo\n! git clone https://github.com/dsgt-kaggle-clef/birdclef-2024.git\n! cd birdclef-2024 && git checkout 1e0586c0a4055e47870fe4e3a1d236cf0b2994a5\n\n# birdnet repo\n! git clone https://github.com/dsgt-kaggle-clef/birdnetlib.git\n! cd birdnetlib && git checkout d84aa1f","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-06-22T18:41:43.666724Z","iopub.execute_input":"2024-06-22T18:41:43.668798Z","iopub.status.idle":"2024-06-22T18:42:10.281661Z","shell.execute_reply.started":"2024-06-22T18:41:43.668735Z","shell.execute_reply":"2024-06-22T18:42:10.279761Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# copy over files so we can take advantage of the cached files\n! rsync \\\n    -r /kaggle/input/dsgt-birdclef-2024-package-sync/pip-packages/ \\\n        pip-packages/\n\n! pip download -d pip-packages --prefer-binary \\\n    ./birdclef-2024 \\\n    ./birdnetlib","metadata":{"execution":{"iopub.status.busy":"2024-06-22T18:42:10.284971Z","iopub.execute_input":"2024-06-22T18:42:10.285508Z","iopub.status.idle":"2024-06-22T18:45:17.586811Z","shell.execute_reply.started":"2024-06-22T18:42:10.285458Z","shell.execute_reply":"2024-06-22T18:45:17.585166Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# now cache encodec stuff offline\n! pip install encodec\nfrom encodec import EncodecModel\n_ = EncodecModel.encodec_model_24khz()\n! rsync -r /root/.cache/torch/hub/checkpoints torch-hub-checkpoints","metadata":{"execution":{"iopub.status.busy":"2024-06-22T18:45:17.589079Z","iopub.execute_input":"2024-06-22T18:45:17.589542Z","iopub.status.idle":"2024-06-22T18:45:43.953758Z","shell.execute_reply.started":"2024-06-22T18:45:17.589500Z","shell.execute_reply":"2024-06-22T18:45:43.952060Z"},"trusted":true},"execution_count":null,"outputs":[]}]}