File tree 2 files changed +50
-2
lines changed
2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ pull_request :
5
+ workflow_call :
6
+ secrets :
7
+ OPENAI_API_KEY :
8
+ required : true
9
+ ANTHROPIC_API_KEY :
10
+ required : true
11
+
12
+ jobs :
13
+ build :
14
+ name : Build & Test
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v5
21
+ with :
22
+ python-version : " 3.x"
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install poetry
27
+ poetry install
28
+
29
+ - name : Run tests
30
+ run : |
31
+ poetry run pytest
32
+
33
+ - name : Build
34
+ run : |
35
+ pip install poetry
36
+ poetry build
37
+
38
+ - uses : actions/upload-artifact@v4
39
+ with :
40
+ path : ./dist
Original file line number Diff line number Diff line change 16
16
},
17
17
]
18
18
19
+ n_gpu_layers = (
20
+ 0 # -1 to offload on GPU. Until GPU is supported on Github, must be run on CPU
21
+ )
22
+
19
23
20
24
def _model_local_path (model ) -> str :
21
25
return os .path .join (
@@ -30,7 +34,11 @@ def _create_models_settings():
30
34
for model in models_to_test :
31
35
local_path = _model_local_path (model )
32
36
models .append (
33
- ModelSettings (model = local_path , model_alias = model ["alias" ], n_gpu_layers = - 1 )
37
+ ModelSettings (
38
+ model = local_path ,
39
+ model_alias = model ["alias" ],
40
+ n_gpu_layers = n_gpu_layers ,
41
+ )
34
42
)
35
43
36
44
return models
@@ -41,7 +49,7 @@ def create_llama(request) -> Llama:
41
49
42
50
return Llama (
43
51
model_path = local_path ,
44
- n_gpu_layers = - 1 ,
52
+ n_gpu_layers = n_gpu_layers ,
45
53
)
46
54
47
55
You can’t perform that action at this time.
0 commit comments