Closed sweep-nightly[bot] closed 10 months ago
src/main.py
✗
Sandbox logs for
pip install -r requirements.txt
1/1 ❌ (`1`)Looking in links: https://download.pytorch.org/whl/torch_stable.html DEPRECATION: The HTML index page being used (https://download.pytorch.org/whl/torch_stable.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at https://github.com/pypa/pip/issues/10825 Collecting annotated-types==0.6.0 Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB) Collecting anyio==3.7.1 Downloading anyio-3.7.1-py3-none-any.whl (80 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 KB 2.3 MB/s eta 0:00:00 Collecting astroid==3.0.1 Downloading astroid-3.0.1-py3-none-any.whl (275 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 275.2/275.2 KB 14.8 MB/s eta 0:00:00 Collecting certifi==2022.12.7 Downloading certifi-2022.12.7-py3-none-any.whl (155 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 KB 13.7 MB/s eta 0:00:00 Collecting charset-normalizer==2.1.1 Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Requirement already satisfied: click==8.1.7 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.1.7) Collecting dill==0.3. Downloading dill-0.3.0.tar.gz (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.4/151.4 KB 22.5 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' ERROR: Could not find a version that satisfies the requirement distutils (from versions: none) ERROR: No matching distribution found for distutils
requirements.txt
✗
Sandbox logs for
pip install -r requirements.txt
1/1 ❌ (`1`)Looking in links: https://download.pytorch.org/whl/torch_stable.html DEPRECATION: The HTML index page being used (https://download.pytorch.org/whl/torch_stable.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at https://github.com/pypa/pip/issues/10825 Collecting annotated-types==0.6.0 Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB) Collecting anyio==3.7.1 Downloading anyio-3.7.1-py3-none-any.whl (80 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 KB 2.5 MB/s eta 0:00:00 Collecting astroid==3.0.1 Downloading astroid-3.0.1-py3-none-any.whl (275 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 275.2/275.2 KB 13.1 MB/s eta 0:00:00 Collecting certifi==2022.12.7 Downloading certifi-2022.12.7-py3-none-any.whl (155 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 KB 27.7 MB/s eta 0:00:00 Collecting charset-normalizer==2.1.1 Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Requirement already satisfied: click==8.1.7 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.1.7) Collecting dill==0.3. Downloading dill-0.3.0.tar.gz (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.4/151.4 KB 21.8 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' ERROR: Could not find a version that satisfies the requirement distutils (from versions: none) ERROR: No matching distribution found for distutils
src/main.py
✗
Sandbox logs for
pip install -r requirements.txt
1/1 ❌ (`1`)Looking in links: https://download.pytorch.org/whl/torch_stable.html DEPRECATION: The HTML index page being used (https://download.pytorch.org/whl/torch_stable.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at https://github.com/pypa/pip/issues/10825 Collecting annotated-types==0.6.0 Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB) Collecting anyio==3.7.1 Downloading anyio-3.7.1-py3-none-any.whl (80 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 KB 2.3 MB/s eta 0:00:00 Collecting astroid==3.0.1 Downloading astroid-3.0.1-py3-none-any.whl (275 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 275.2/275.2 KB 14.8 MB/s eta 0:00:00 Collecting certifi==2022.12.7 Downloading certifi-2022.12.7-py3-none-any.whl (155 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 KB 13.7 MB/s eta 0:00:00 Collecting charset-normalizer==2.1.1 Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Requirement already satisfied: click==8.1.7 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.1.7) Collecting dill==0.3. Downloading dill-0.3.0.tar.gz (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.4/151.4 KB 22.5 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' ERROR: Could not find a version that satisfies the requirement distutils (from versions: none) ERROR: No matching distribution found for distutils
src/api.py
✗
Sandbox logs for
pip install -r requirements.txt
1/1 ❌ (`1`)Looking in links: https://download.pytorch.org/whl/torch_stable.html DEPRECATION: The HTML index page being used (https://download.pytorch.org/whl/torch_stable.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at https://github.com/pypa/pip/issues/10825 Collecting annotated-types==0.6.0 Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB) Collecting anyio==3.7.1 Downloading anyio-3.7.1-py3-none-any.whl (80 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 KB 2.3 MB/s eta 0:00:00 Collecting astroid==3.0.1 Downloading astroid-3.0.1-py3-none-any.whl (275 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 275.2/275.2 KB 13.5 MB/s eta 0:00:00 Collecting certifi==2022.12.7 Downloading certifi-2022.12.7-py3-none-any.whl (155 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 KB 20.0 MB/s eta 0:00:00 Collecting charset-normalizer==2.1.1 Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Requirement already satisfied: click==8.1.7 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.1.7) Collecting dill==0.3. Downloading dill-0.3.0.tar.gz (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.4/151.4 KB 21.9 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' ERROR: Could not find a version that satisfies the requirement distutils (from versions: none) ERROR: No matching distribution found for distutils
Description
This PR refactors the training loop from a script to a class in order to improve code organization and reusability. The changes are made in the
main.py
andapi.py
files.Summary of Changes
In
main.py
:TrainModel
to encapsulate the training loop.__init__
method to initialize the model, criterion, optimizer, and dataloader.train
method to perform the training loop.TrainModel
class.In
api.py
:TrainModel
class frommain.py
.TrainModel
class if applicable.Please review and merge these changes.
Fixes #6.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: