Skip to content

Commit

Permalink
flake8 train and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
beckynevin committed Jan 31, 2024
1 parent d144619 commit 2af5bbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/scripts/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
# Absolute path to the `src/tex/figures` folder (contains figure output)
figures = tex / "figures"

# Absolute path to the `src/tex/output` folder (contains other user-defined output)
output = tex / "output"
# Absolute path to the `src/tex/output` folder
# (contains other user-defined output)
output = tex / "output"
16 changes: 12 additions & 4 deletions src/scripts/train.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""
Simple stubs to use for re-train of the final model
Can leave a default data source, or specify that 'load data' loads the dataset used in the final version
Can leave a default data source, or specify that 'load data' loads the dataset
used in the final version
"""

import argparse


Expand All @@ -11,12 +13,14 @@ def architecture():
"""
return 0


def load_data(data_source):
"""
:return: data loader or full training data, split in val and train
"""
return 0, 0


def train_model(data_source, n_epochs):
"""
:param data_source:
Expand All @@ -26,13 +30,17 @@ def train_model(data_source, n_epochs):
data = load_data(data_source)
model = architecture()

return 0
return data, model


if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--data_source", type=str, help="Data used to train the model")
parser.add_argument("--n_epochs", type=int, help='Integer number of epochs to train the model')
parser.add_argument("--data_source", type=str,
help="Data used to train the model")
parser.add_argument(
"--n_epochs", type=int,
help="Integer number of epochs to train the model"
)

args = parser.parse_args()

Expand Down

0 comments on commit 2af5bbc

Please sign in to comment.