aiauto-client 0.1.15__tar.gz → 0.1.17__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.
Files changed (21) hide show
  1. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/PKG-INFO +7 -5
  2. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/README.md +6 -4
  3. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/examples/example_torch_multiple_objective.py +2 -0
  4. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/examples/example_torch_single_objective.py +9 -6
  5. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/examples/simple_example.py +2 -2
  6. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/pyproject.toml +1 -1
  7. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/core.py +3 -3
  8. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto_client.egg-info/PKG-INFO +7 -5
  9. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/MANIFEST.in +0 -0
  10. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/setup.cfg +0 -0
  11. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/__init__.py +0 -0
  12. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/_config.py +0 -0
  13. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/constants.py +0 -0
  14. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/http_client.py +0 -0
  15. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto/serializer.py +0 -0
  16. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto_client.egg-info/SOURCES.txt +0 -0
  17. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto_client.egg-info/dependency_links.txt +0 -0
  18. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto_client.egg-info/requires.txt +0 -0
  19. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/src/aiauto_client.egg-info/top_level.txt +0 -0
  20. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/tests/test_pruners.py +0 -0
  21. {aiauto_client-0.1.15 → aiauto_client-0.1.17}/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.15
3
+ Version: 0.1.17
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
@@ -121,7 +121,7 @@ Jupyter Notebook이나 Python REPL에서 정의한 함수는 Serialize 할 수
121
121
  import aiauto
122
122
  import optuna
123
123
 
124
- def objective(trial: optuna.trial.Trial):
124
+ def objective(trial):
125
125
  """
126
126
  이 함수는 외부 서버에서 실행됩니다.
127
127
  모든 import는 함수 내부에 작성하세요.
@@ -170,7 +170,7 @@ time.sleep(5)
170
170
  # `https://dashboard.common.aiauto.pangyo.ainode.ai/study` 에서 생성된 study 확인 가능
171
171
 
172
172
  # objective 함수 정의
173
- def objective(trial: optuna.trial.Trial):
173
+ def objective(trial):
174
174
  """실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수"""
175
175
  x = trial.suggest_float('x', -10, 10)
176
176
  y = trial.suggest_float('y', -10, 10)
@@ -214,7 +214,7 @@ time.sleep(5)
214
214
 
215
215
  # objective 함수 정의
216
216
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
217
- def objective(trial: optuna.trial.Trial):
217
+ def objective(trial):
218
218
  """
219
219
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
220
220
  모든 import는 함수 내부에 존재해야 함
@@ -224,6 +224,8 @@ def objective(trial: optuna.trial.Trial):
224
224
  from torch.utils.data import DataLoader, random_split, Subset
225
225
  from torchvision import transforms, datasets
226
226
  import torch.nn.functional as F
227
+
228
+ import optuna
227
229
 
228
230
  # 하이퍼파라미터 샘플링
229
231
  lr = trial.suggest_float('learning_rate', 1e-5, 1e-1, log=True)
@@ -349,7 +351,7 @@ time.sleep(5)
349
351
 
350
352
  # objective 함수 정의
351
353
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
352
- def objective(trial: optuna.trial.Trial):
354
+ def objective(trial):
353
355
  """
354
356
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
355
357
  모든 import는 함수 내부에 존재해야 함
@@ -94,7 +94,7 @@ Jupyter Notebook이나 Python REPL에서 정의한 함수는 Serialize 할 수
94
94
  import aiauto
95
95
  import optuna
96
96
 
97
- def objective(trial: optuna.trial.Trial):
97
+ def objective(trial):
98
98
  """
99
99
  이 함수는 외부 서버에서 실행됩니다.
100
100
  모든 import는 함수 내부에 작성하세요.
@@ -143,7 +143,7 @@ time.sleep(5)
143
143
  # `https://dashboard.common.aiauto.pangyo.ainode.ai/study` 에서 생성된 study 확인 가능
144
144
 
145
145
  # objective 함수 정의
146
- def objective(trial: optuna.trial.Trial):
146
+ def objective(trial):
147
147
  """실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수"""
148
148
  x = trial.suggest_float('x', -10, 10)
149
149
  y = trial.suggest_float('y', -10, 10)
@@ -187,7 +187,7 @@ time.sleep(5)
187
187
 
188
188
  # objective 함수 정의
189
189
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
190
- def objective(trial: optuna.trial.Trial):
190
+ def objective(trial):
191
191
  """
192
192
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
193
193
  모든 import는 함수 내부에 존재해야 함
@@ -197,6 +197,8 @@ def objective(trial: optuna.trial.Trial):
197
197
  from torch.utils.data import DataLoader, random_split, Subset
198
198
  from torchvision import transforms, datasets
199
199
  import torch.nn.functional as F
200
+
201
+ import optuna
200
202
 
201
203
  # 하이퍼파라미터 샘플링
202
204
  lr = trial.suggest_float('learning_rate', 1e-5, 1e-1, log=True)
@@ -322,7 +324,7 @@ time.sleep(5)
322
324
 
323
325
  # objective 함수 정의
324
326
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
325
- def objective(trial: optuna.trial.Trial):
327
+ def objective(trial):
326
328
  """
327
329
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
328
330
  모든 import는 함수 내부에 존재해야 함
@@ -49,6 +49,7 @@ def objective_multi(trial):
49
49
  from fvcore.nn import FlopCountAnalysis
50
50
 
51
51
  from optuna.artifacts import upload_artifact
52
+ import aiauto
52
53
 
53
54
 
54
55
  # objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
@@ -259,6 +260,7 @@ def objective_detailed(trial):
259
260
  from fvcore.nn import FlopCountAnalysis
260
261
 
261
262
  from optuna.artifacts import upload_artifact
263
+ import aiauto
262
264
 
263
265
 
264
266
  # objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
@@ -47,7 +47,9 @@ def objective_single(trial):
47
47
  from torchvision import transforms, datasets
48
48
  import torch.nn.functional as F
49
49
 
50
+ import optuna
50
51
  from optuna.artifacts import upload_artifact
52
+ import aiauto
51
53
 
52
54
 
53
55
  # objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
@@ -153,10 +155,10 @@ def objective_single(trial):
153
155
  root="/tmp/cifar10_data", # Pod의 임시 디렉토리 사용
154
156
  train=True,
155
157
  download=True,
156
- transform=[
158
+ transform=transforms.Compose([
157
159
  transforms.ToTensor(),
158
160
  transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
159
- ],
161
+ ]),
160
162
  )
161
163
  # 전체 데이터를 train, valid로 분할
162
164
  n_total = len(dataset)
@@ -261,6 +263,7 @@ def objective_detailed(trial):
261
263
  import torch.nn.functional as F
262
264
 
263
265
  from optuna.artifacts import upload_artifact
266
+ import aiauto
264
267
 
265
268
 
266
269
  # objective 함수의 매개변수로 받아온 optuna 자체의 trial 을 aiauto 에서 사용하는 TrialController 로 Warpping Log 찍는 용도
@@ -352,19 +355,19 @@ def objective_detailed(trial):
352
355
  root="/tmp/cifar10_data",
353
356
  train=True,
354
357
  download=True,
355
- transform=[
358
+ transform=transforms.Compose([
356
359
  transforms.ToTensor(),
357
360
  transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
358
- ],
361
+ ]),
359
362
  )
360
363
  test_dataset = datasets.CIFAR10(
361
364
  root="/tmp/cifar10_data",
362
365
  train=False,
363
366
  download=True,
364
- transform=[
367
+ transform=transforms.Compose([
365
368
  transforms.ToTensor(),
366
369
  transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
367
- ],
370
+ ]),
368
371
  )
369
372
 
370
373
  tc.log(f'full dataset: train {len(train_dataset)}, test {len(test_dataset)}')
@@ -26,7 +26,7 @@ ac = aiauto.AIAutoController('<token>')
26
26
 
27
27
 
28
28
  # single objective accuracy
29
- def simple_objective(trial):
29
+ def objective_simple(trial):
30
30
  import optuna
31
31
  import aiauto
32
32
  """
@@ -74,7 +74,7 @@ if __name__ == '__main__':
74
74
  # runtime_image = "ghcr.io/astral-sh/uv:python3.8-bookworm-slim", # default image for use_gpu False
75
75
  )
76
76
  time.sleep(5)
77
-
77
+
78
78
  study = study_wrapper.get_study()
79
79
 
80
80
  print('\nBest trials:')
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aiauto-client"
7
- version = "0.1.15"
7
+ version = "0.1.17"
8
8
  description = "AI Auto HPO (Hyperparameter Optimization) Client Library"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -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] = 'ghcr.io/astral-sh/uv:python3.8-bookworm-slim',
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.15
3
+ Version: 0.1.17
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
@@ -121,7 +121,7 @@ Jupyter Notebook이나 Python REPL에서 정의한 함수는 Serialize 할 수
121
121
  import aiauto
122
122
  import optuna
123
123
 
124
- def objective(trial: optuna.trial.Trial):
124
+ def objective(trial):
125
125
  """
126
126
  이 함수는 외부 서버에서 실행됩니다.
127
127
  모든 import는 함수 내부에 작성하세요.
@@ -170,7 +170,7 @@ time.sleep(5)
170
170
  # `https://dashboard.common.aiauto.pangyo.ainode.ai/study` 에서 생성된 study 확인 가능
171
171
 
172
172
  # objective 함수 정의
173
- def objective(trial: optuna.trial.Trial):
173
+ def objective(trial):
174
174
  """실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수"""
175
175
  x = trial.suggest_float('x', -10, 10)
176
176
  y = trial.suggest_float('y', -10, 10)
@@ -214,7 +214,7 @@ time.sleep(5)
214
214
 
215
215
  # objective 함수 정의
216
216
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
217
- def objective(trial: optuna.trial.Trial):
217
+ def objective(trial):
218
218
  """
219
219
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
220
220
  모든 import는 함수 내부에 존재해야 함
@@ -224,6 +224,8 @@ def objective(trial: optuna.trial.Trial):
224
224
  from torch.utils.data import DataLoader, random_split, Subset
225
225
  from torchvision import transforms, datasets
226
226
  import torch.nn.functional as F
227
+
228
+ import optuna
227
229
 
228
230
  # 하이퍼파라미터 샘플링
229
231
  lr = trial.suggest_float('learning_rate', 1e-5, 1e-1, log=True)
@@ -349,7 +351,7 @@ time.sleep(5)
349
351
 
350
352
  # objective 함수 정의
351
353
  # https://docs.pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 참고
352
- def objective(trial: optuna.trial.Trial):
354
+ def objective(trial):
353
355
  """
354
356
  실제 실행은 사용자 로컬 컴퓨터가 아닌 서버에서 실행 될 함수
355
357
  모든 import는 함수 내부에 존재해야 함
File without changes