Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
daanelson committed Aug 27, 2024
1 parent 90d5462 commit fafb1c8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- event: push
model: 'dev', 'schnell'
env: 'prod'
- event: workflow_dispatch
model: 'dev', 'schnell'
env: 'prod'

steps:
- name: Checkout
Expand Down Expand Up @@ -95,7 +98,7 @@ jobs:
- name: Test model
env:
REPLICATE_API_TOKEN: ${{secrets.REPLICATE_API_TOKEN}}
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
MODEL: ${{ matrix.model }}
TEST_ENV: ${{ matrix.env }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/test-model.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def wait_for_server_to_be_ready(url, timeout=400):
def inference_func():
if ENV == 'local':
return partial(local_run, LOCAL_ENDPOINT)
elif ENV in {'staging', 'prod'}:
elif ENV in {'test', 'prod'}:
model = replicate.models.get(MODEL)
version = model.versions.list()[0]
return partial(replicate_run, version)
else:
raise Exception(f"env should be local, staging, or prod but was {ENV}")
raise Exception(f"env should be local, test, or prod but was {ENV}")


@pytest.fixture(scope="session", autouse=True)
Expand Down
2 changes: 0 additions & 2 deletions predict.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import pickle
import time
from typing import Optional

Expand All @@ -8,7 +7,6 @@

import torch
import numpy as np
from einops import rearrange
from PIL import Image
from typing import List
from einops import rearrange
Expand Down
5 changes: 5 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy
pytest
replicate
requests
Pillow
1 change: 0 additions & 1 deletion torch_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@
# 1440:1440
# torch.Size([1, 16, 180, 180])
# torch.Size([1, 8100, 64])
_

0 comments on commit fafb1c8

Please sign in to comment.