{"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":"# Move software to working disk\nimport os\n\nos.system('rm  -r software')\nos.system('scp -r /kaggle/input/graphnet-and-dependencies/software ./')\n\nos.system('pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113')\n#os.system('pip install /kaggle/input/torch111cu113/pyg_lib-0.1.0pt111cu113-cp37-cp37m-linux_x86_64.whl')\n#os.system('pip install /kaggle/working/software/dependencies/torch-1.11.0+cu115-cp37-cp37m-linux_x86_64.whl')\nos.system('pip install /kaggle/working/software/dependencies/torch_cluster-1.6.0-cp37-cp37m-linux_x86_64.whl')\nos.system('pip install /kaggle/working/software/dependencies/torch_scatter-2.0.9-cp37-cp37m-linux_x86_64.whl')\nos.system('pip install /kaggle/working/software/dependencies/torch_sparse-0.6.13-cp37-cp37m-linux_x86_64.whl')\nos.system('pip install /kaggle/working/software/dependencies/torch_geometric-2.0.4.tar.gz')\n\nos.system('cd software/graphnet;pip install --no-index --find-links=\"/kaggle/working/software/dependencies\" -e .[torch]')\n\n# os.system('pip install torchvision==0.12.0')\nos.system('pip install pytorch_lightning==1.9.3')\n# !rm  -r software\n# !scp -r /kaggle/input/graphnet-and-dependencies/software .\n\n# # Install dependencies\n# !pip install /kaggle/working/software/dependencies/torch-1.11.0+cu115-cp37-cp37m-linux_x86_64.whl\n# !pip install /kaggle/working/software/dependencies/torch_cluster-1.6.0-cp37-cp37m-linux_x86_64.whl\n# !pip install /kaggle/working/software/dependencies/torch_scatter-2.0.9-cp37-cp37m-linux_x86_64.whl\n# !pip install /kaggle/working/software/dependencies/torch_sparse-0.6.13-cp37-cp37m-linux_x86_64.whl\n# !pip install /kaggle/working/software/dependencies/torch_geometric-2.0.4.tar.gz\n\n# # Install GraphNeT\n# !cd software/graphnet;pip install --no-index --find-links=\"/kaggle/working/software/dependencies\" -e .[torch]\n\n# !pip install torchvision==0.12.0\n\n# Append to PATH\nimport sys\nsys.path.append('/kaggle/working/software/graphnet/src')\n\nimport graphnet","metadata":{"_uuid":"5e0329da-8775-4bb8-8dd3-a5984169f640","_cell_guid":"b46c9114-def1-4764-8639-21725021808d","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2023-03-17T14:21:18.67482Z","iopub.execute_input":"2023-03-17T14:21:18.675369Z","iopub.status.idle":"2023-03-17T14:25:46.723282Z","shell.execute_reply.started":"2023-03-17T14:21:18.675329Z","shell.execute_reply":"2023-03-17T14:25:46.721957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nos.system('cp /kaggle/input/fork1-of-icev0-1/batch_52_56.db ./')\nos.system('cp /kaggle/input/fork1-of-icev0-1/counts.csv ./')\nos.system('cp /kaggle/input/fork1-of-icev0-1/train.py ./')\nos.system('cp /kaggle/input/fork1-of-icev0-1/train_selection_max_200_pulses.csv ./')\nos.system('cp /kaggle/input/fork1-of-icev0-1/validate_selection_max_200_pulses.csv ./')\n","metadata":{"execution":{"iopub.status.busy":"2023-03-17T14:25:51.613686Z","iopub.execute_input":"2023-03-17T14:25:51.614679Z","iopub.status.idle":"2023-03-17T14:26:08.326015Z","shell.execute_reply.started":"2023-03-17T14:25:51.614619Z","shell.execute_reply":"2023-03-17T14:26:08.324705Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!python train.py","metadata":{"execution":{"iopub.status.busy":"2023-03-17T14:27:24.562718Z","iopub.execute_input":"2023-03-17T14:27:24.563476Z","iopub.status.idle":"2023-03-17T14:34:01.487477Z","shell.execute_reply.started":"2023-03-17T14:27:24.563413Z","shell.execute_reply":"2023-03-17T14:34:01.486188Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# %%writefile test.py\n\n# import os\n# import torch\n# os.system('pip uninstall -y pytorch_lightning')\n# os.system('pip install pytorch_lightning==1.9.3')\n# print('starting test')\n# import pytorch_lightning\n# from pytorch_lightning.callbacks import EarlyStopping\n# print(pytorch_lightning.__version__)\n\n# print('finishing test')","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# !python test.py","metadata":{"trusted":true},"execution_count":null,"outputs":[]}]}