Skip to content

Commit d8c8f67

Browse files
committed
[update] 20250309
1 parent 64fc0b5 commit d8c8f67

File tree

6 files changed

+34
-15
lines changed

6 files changed

+34
-15
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ python:
44
- "3.8"
55
- "3.9"
66
- "3.10"
7+
- "3.11"
8+
- "3.12"
79

810
install:
911
- pip install -r requirements.txt

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os
22
import shutil
33
import sys
4-
from distutils.core import Extension, setup
54

65
from Cython.Build import cythonize
6+
from setuptools import Extension, setup
77

88

99
def walk(root, exclude=(), copy=()):

circle.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ version: 2.1
33
workflows:
44
test:
55
jobs:
6-
- test-py38
7-
- test-py39
8-
- test-py310
6+
- job-py38
7+
- job-py39
8+
- job-py310
9+
- job-py311
10+
- job-py312
911

1012
jobs:
11-
test-py36: &test-template
13+
job-py38: &job-template
1214
docker:
13-
- image: circleci/python:3.6
15+
- image: cimg/python:3.8
1416

1517
working_directory: ~/repo
1618

@@ -59,17 +61,22 @@ jobs:
5961
path: test-reports
6062
destination: test-reports
6163

62-
test-py38:
63-
<<: *test-template
64+
job-py39:
65+
<<: *job-template
6466
docker:
65-
- image: circleci/python:3.8
67+
- image: cimg/python:3.9
6668

67-
test-py39:
68-
<<: *test-template
69+
job-py310:
70+
<<: *job-template
6971
docker:
70-
- image: circleci/python:3.9
72+
- image: cimg/python:3.10
7173

72-
test-py310:
73-
<<: *test-template
74+
job-py311:
75+
<<: *job-template
7476
docker:
75-
- image: circleci/python:3.10
77+
- image: cimg/python:3.11
78+
79+
job-py312:
80+
<<: *job-template
81+
docker:
82+
- image: cimg/python:3.12

configs/Env.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ def __init__(self):
1919
os.path.join(os.path.dirname(__file__), '..', self.paths.root_folder))
2020
else:
2121
raise ValueError('Lack of `res/env/paths.json` file or `root_folder` value')
22+
self.set_environ()
23+
24+
def set_environ(self):
25+
if hasattr(self, 'environ'):
26+
for key, value in self.environ.dict().items():
27+
os.environ[key] = value
2228

2329
def getdir(self, path):
2430
return os.path.abspath(os.path.join(self.paths.root_folder, path))

res/env/environ.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"HF_ENDPOINT": "https://hf-mirror.com"
3+
}

utils/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
def set_seed(seed=0):
18+
seed = int(seed)
1819
torch.manual_seed(seed)
1920
torch.cuda.manual_seed(seed)
2021
torch.cuda.manual_seed_all(seed)

0 commit comments

Comments
 (0)