Skip to content

Commit 5c74d06

Browse files
committed
Made CPU the only device, GPU is not supported on AWS lambda
1 parent d92134b commit 5c74d06

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

evaluation_function/models/basic_nn.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ def train_model(device):
7272
return model
7373

7474
def run(response, answer, params: Params) -> Result:
75-
print("GPU") if torch.backends.mps.is_available() else print("CPU")
76-
device = torch.device("mps" if torch.backends.mps.is_available() else "cpu")
75+
# print("GPU") if torch.backends.mps.is_available() else print("CPU")
76+
# device = torch.device("mps" if torch.backends.mps.is_available() else "cpu")
77+
78+
device = "cpu"
79+
7780
refresh = params.get("refresh", False)
7881
if refresh:
7982
model = train_model(device)

0 commit comments

Comments
 (0)