aiauto-client 0.1.16__tar.gz → 0.1.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/PKG-INFO +1 -1
- aiauto_client-0.1.16/examples/simple_example.py → aiauto_client-0.1.18/examples/example_simple.py +3 -3
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/examples/example_torch_multiple_objective.py +10 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/examples/example_torch_single_objective.py +16 -6
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/pyproject.toml +1 -1
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/core.py +3 -3
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/PKG-INFO +1 -1
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/SOURCES.txt +1 -1
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/MANIFEST.in +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/README.md +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/setup.cfg +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/__init__.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/_config.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/constants.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/http_client.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto/serializer.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/dependency_links.txt +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/requires.txt +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/top_level.txt +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/tests/test_pruners.py +0 -0
- {aiauto_client-0.1.16 → aiauto_client-0.1.18}/tests/test_samplers.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: aiauto-client
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.18
|
4
4
|
Summary: AI Auto HPO (Hyperparameter Optimization) Client Library
|
5
5
|
Author-email: AIAuto Team <ainode@zeroone.ai>
|
6
6
|
Project-URL: Homepage, https://dashboard.common.aiauto.pangyo.ainode.ai
|
aiauto_client-0.1.16/examples/simple_example.py → aiauto_client-0.1.18/examples/example_simple.py
RENAMED
@@ -8,10 +8,11 @@
|
|
8
8
|
- Mac ARM 환경에서도 문제없이 실행 가능
|
9
9
|
|
10
10
|
실행:
|
11
|
-
$ python
|
11
|
+
$ python example_simple.py
|
12
12
|
"""
|
13
13
|
|
14
14
|
import aiauto
|
15
|
+
import optuna
|
15
16
|
import time
|
16
17
|
|
17
18
|
|
@@ -27,7 +28,6 @@ ac = aiauto.AIAutoController('<token>')
|
|
27
28
|
|
28
29
|
# single objective accuracy
|
29
30
|
def objective_simple(trial):
|
30
|
-
import optuna
|
31
31
|
import aiauto
|
32
32
|
"""
|
33
33
|
간단한 2차 함수 최적화
|
@@ -67,7 +67,7 @@ if __name__ == '__main__':
|
|
67
67
|
time.sleep(5)
|
68
68
|
|
69
69
|
study_wrapper.optimize(
|
70
|
-
|
70
|
+
objective_simple,
|
71
71
|
n_trials=20,
|
72
72
|
parallelism=2, # 동시 실행 Pod 수
|
73
73
|
# use_gpu=False, # default
|
@@ -52,6 +52,11 @@ def objective_multi(trial):
|
|
52
52
|
import aiauto
|
53
53
|
|
54
54
|
|
55
|
+
# TODO singleton 객체에 토큰 값 지정하면 객체 초기화 시 설정 됨
|
56
|
+
# ac.get_artifact_store() 하기 위한 용도로 objective 안에서 한 번 더 초기화
|
57
|
+
# singleton 이라서 상관 없다
|
58
|
+
ac = aiauto.AIAutoController('<token>')
|
59
|
+
|
55
60
|
# objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
|
56
61
|
# log 는 optuna dashboard 에서 확인 가능
|
57
62
|
# 하나의 trial objective 함수 안에서만 사용하는 trial 객체
|
@@ -263,6 +268,11 @@ def objective_detailed(trial):
|
|
263
268
|
import aiauto
|
264
269
|
|
265
270
|
|
271
|
+
# TODO singleton 객체에 토큰 값 지정하면 객체 초기화 시 설정 됨
|
272
|
+
# ac.get_artifact_store() 하기 위한 용도로 objective 안에서 한 번 더 초기화
|
273
|
+
# singleton 이라서 상관 없다
|
274
|
+
ac = aiauto.AIAutoController('<token>')
|
275
|
+
|
266
276
|
# objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
|
267
277
|
# log 는 optuna dashboard 에서 확인 가능
|
268
278
|
# 하나의 trial objective 함수 안에서만 사용하는 trial 객체
|
@@ -52,6 +52,11 @@ def objective_single(trial):
|
|
52
52
|
import aiauto
|
53
53
|
|
54
54
|
|
55
|
+
# TODO singleton 객체에 토큰 값 지정하면 객체 초기화 시 설정 됨
|
56
|
+
# ac.get_artifact_store() 하기 위한 용도로 objective 안에서 한 번 더 초기화
|
57
|
+
# singleton 이라서 상관 없다
|
58
|
+
ac = aiauto.AIAutoController('<token>')
|
59
|
+
|
55
60
|
# objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
|
56
61
|
# log 는 optuna dashboard 에서 확인 가능
|
57
62
|
# 하나의 trial objective 함수 안에서만 사용하는 trial 객체
|
@@ -155,10 +160,10 @@ def objective_single(trial):
|
|
155
160
|
root="/tmp/cifar10_data", # Pod의 임시 디렉토리 사용
|
156
161
|
train=True,
|
157
162
|
download=True,
|
158
|
-
transform=[
|
163
|
+
transform=transforms.Compose([
|
159
164
|
transforms.ToTensor(),
|
160
165
|
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
|
161
|
-
],
|
166
|
+
]),
|
162
167
|
)
|
163
168
|
# 전체 데이터를 train, valid로 분할
|
164
169
|
n_total = len(dataset)
|
@@ -266,6 +271,11 @@ def objective_detailed(trial):
|
|
266
271
|
import aiauto
|
267
272
|
|
268
273
|
|
274
|
+
# TODO singleton 객체에 토큰 값 지정하면 객체 초기화 시 설정 됨
|
275
|
+
# ac.get_artifact_store() 하기 위한 용도로 objective 안에서 한 번 더 초기화
|
276
|
+
# singleton 이라서 상관 없다
|
277
|
+
ac = aiauto.AIAutoController('<token>')
|
278
|
+
|
269
279
|
# objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
|
270
280
|
# log 는 optuna dashboard 에서 확인 가능
|
271
281
|
# 하나의 trial objective 함수 안에서만 사용하는 trial 객체
|
@@ -355,19 +365,19 @@ def objective_detailed(trial):
|
|
355
365
|
root="/tmp/cifar10_data",
|
356
366
|
train=True,
|
357
367
|
download=True,
|
358
|
-
transform=[
|
368
|
+
transform=transforms.Compose([
|
359
369
|
transforms.ToTensor(),
|
360
370
|
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
|
361
|
-
],
|
371
|
+
]),
|
362
372
|
)
|
363
373
|
test_dataset = datasets.CIFAR10(
|
364
374
|
root="/tmp/cifar10_data",
|
365
375
|
train=False,
|
366
376
|
download=True,
|
367
|
-
transform=[
|
377
|
+
transform=transforms.Compose([
|
368
378
|
transforms.ToTensor(),
|
369
379
|
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
|
370
|
-
],
|
380
|
+
]),
|
371
381
|
)
|
372
382
|
|
373
383
|
tc.log(f'full dataset: train {len(train_dataset)}, test {len(test_dataset)}')
|
@@ -190,7 +190,7 @@ class StudyWrapper:
|
|
190
190
|
requirements_list: Optional[List[str]] = None,
|
191
191
|
resources_requests: Optional[Dict[str, str]] = None,
|
192
192
|
resources_limits: Optional[Dict[str, str]] = None,
|
193
|
-
runtime_image: Optional[str] =
|
193
|
+
runtime_image: Optional[str] = None,
|
194
194
|
use_gpu: bool = False
|
195
195
|
) -> None:
|
196
196
|
# 리소스 기본값 설정
|
@@ -199,13 +199,13 @@ class StudyWrapper:
|
|
199
199
|
resources_requests = {"cpu": "2", "memory": "4Gi"}
|
200
200
|
else:
|
201
201
|
resources_requests = {"cpu": "1", "memory": "1Gi"}
|
202
|
-
|
202
|
+
|
203
203
|
if resources_limits is None:
|
204
204
|
if use_gpu:
|
205
205
|
resources_limits = {"cpu": "2", "memory": "4Gi"}
|
206
206
|
else:
|
207
207
|
resources_limits = {"cpu": "1", "memory": "1Gi"}
|
208
|
-
|
208
|
+
|
209
209
|
if runtime_image is None or runtime_image == "":
|
210
210
|
if use_gpu:
|
211
211
|
runtime_image = "pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: aiauto-client
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.18
|
4
4
|
Summary: AI Auto HPO (Hyperparameter Optimization) Client Library
|
5
5
|
Author-email: AIAuto Team <ainode@zeroone.ai>
|
6
6
|
Project-URL: Homepage, https://dashboard.common.aiauto.pangyo.ainode.ai
|
@@ -1,9 +1,9 @@
|
|
1
1
|
MANIFEST.in
|
2
2
|
README.md
|
3
3
|
pyproject.toml
|
4
|
+
examples/example_simple.py
|
4
5
|
examples/example_torch_multiple_objective.py
|
5
6
|
examples/example_torch_single_objective.py
|
6
|
-
examples/simple_example.py
|
7
7
|
src/aiauto/__init__.py
|
8
8
|
src/aiauto/_config.py
|
9
9
|
src/aiauto/constants.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{aiauto_client-0.1.16 → aiauto_client-0.1.18}/src/aiauto_client.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|