-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement workflow for training with multiple gpus
- Loading branch information
Showing
9 changed files
with
106 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# for tests on Linux machines | ||
FROM python:3.9.13 | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
RUN python -m venv venv | ||
|
||
RUN . venv/bin/activate | ||
|
||
COPY requirements.txt /app/requirements.txt | ||
|
||
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt | ||
|
||
COPY /src /app/src | ||
|
||
CMD ["python", "-u", "src/training.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from utils.config import * | ||
from utils.download_weights import * | ||
from utils.downloads import * | ||
from utils.lr_warmup import * |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
''' | ||
Utility functions for loading weights. | ||
''' | ||
|
||
import gdown | ||
|
||
def download_weights(checkpoint_fpath): | ||
''' | ||
Downloads weights from Google Drive. | ||
''' | ||
|
||
gdown.download('https://drive.google.com/uc?id=10ieSMMJzE9EeiPIF3CMzeT4timiQTjHV', checkpoint_fpath, quiet=False) | ||
|
||
def download_dataset(destination_path): | ||
''' | ||
Downloads dataset from Google Drive. | ||
''' | ||
|
||
gdown.download('https://drive.google.com/uc?id=1E7lKanGE2Gakgy3mvyUal_B43BxU3vHr', destination_path, quiet=False) |