{"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":"markdown","source":"# Instructions:\n* This notebook attempts to simulate the terminal environment in which the scripts shall be run. \n* The submission must be done in a zip file which should indicate the team name in the following format, **TEAM_NAME.zip** and should contain **only** the script **main.py** that will be used for both training and inference.\n* The expected input for the script is only the 'root_dir' and 'output_dir' argument, which will  be the **only** arguments that are passed for running the script in Phase 2 of the competition. The other arguments provided are for faster experimentation or in this notebook for demonstation purposes only. If the participants wish to use values different from what are provided in the training script, they are requested to modify the same in the default args or use them as hardcoded constants. **No config files will be accepted**, as submisison of a zip file containing only the 'main.py' is expected.\n* The output directory is expected to have the final 'submission.csv', which is the output of the model after inference on the test folder inside the 'root_dir'. This submission will be used to grade the team on the leaderboard.\n* It is also important to mention that the script has the logic to break the training loop after a certain time (31680 secs in this case) to meet the train time constraint of 9 hours. In case participants choose to use a different script, they are requested to **include a logic to break the code after 9 hours of training time**. Violations to train time constraints will not be accepted for final leaderboard submissions.","metadata":{}},{"cell_type":"markdown","source":"The following cell demonstrates the ability of the main script to break if memory constraints are violated, for example trying to fit a batch size which is larger than feasible. The cell includes the mandatory arguments ('root_dir' and 'output_dir'). The 'batch_size' argument is passed only to show how the script behaves if the memory constraint is violated.\n","metadata":{}},{"cell_type":"code","source":"!python /kaggle/usr/lib/main_py/main_py.py --root_dir /kaggle/input/budgeted-model-training-iccv-2023-rcv-workshop/imagenet-100-set1 --output_dir ./ --batch_size 160","metadata":{"execution":{"iopub.status.busy":"2023-06-04T15:07:21.890878Z","iopub.execute_input":"2023-06-04T15:07:21.891281Z","iopub.status.idle":"2023-06-04T15:07:53.833077Z","shell.execute_reply.started":"2023-06-04T15:07:21.891244Z","shell.execute_reply":"2023-06-04T15:07:53.831577Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"train_time is sent as an argument only for quick execution. Default value is set to ~8.8hrs","metadata":{}},{"cell_type":"code","source":"!python /kaggle/usr/lib/main_py/main_py.py --root_dir /kaggle/input/budgeted-model-training-iccv-2023-rcv-workshop/imagenet-100-set1 --output_dir ./ --train_time 1200","metadata":{"execution":{"iopub.status.busy":"2023-06-05T12:54:46.369479Z","iopub.execute_input":"2023-06-05T12:54:46.369779Z","iopub.status.idle":"2023-06-05T13:00:47.550463Z","shell.execute_reply.started":"2023-06-05T12:54:46.369749Z","shell.execute_reply":"2023-06-05T13:00:47.549106Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}