autogluon.common 1.2.1b20250218__py3-none-any.whl → 1.2.1b20250219__py3-none-any.whl

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.
@@ -35,11 +35,14 @@ class ResourceManager:
35
35
  return num_gpus
36
36
 
37
37
  @staticmethod
38
- def get_gpu_count_torch():
38
+ def get_gpu_count_torch() -> int:
39
39
  try:
40
40
  import torch
41
41
 
42
- num_gpus = torch.cuda.device_count()
42
+ if not torch.cuda.is_available():
43
+ num_gpus = 0
44
+ else:
45
+ num_gpus = torch.cuda.device_count()
43
46
  except Exception:
44
47
  num_gpus = 0
45
48
  return num_gpus
@@ -31,7 +31,7 @@ def try_import_mxboard():
31
31
 
32
32
 
33
33
  def try_import_ray() -> ModuleType:
34
- RAY_MAX_VERSION = "2.41.0" # sync with core/setup.py
34
+ RAY_MAX_VERSION = "2.43.0" # sync with core/setup.py
35
35
  ray_max_version_os_map = dict(
36
36
  Darwin=RAY_MAX_VERSION,
37
37
  Windows=RAY_MAX_VERSION,
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import logging
2
4
  import os
3
5
  import platform
@@ -22,7 +24,9 @@ logger = logging.getLogger(__name__)
22
24
  LITE_MODE: bool = __lite__ is not None and __lite__
23
25
 
24
26
 
25
- def setup_outputdir(path, warn_if_exist=True, create_dir=True, path_suffix=None):
27
+ def setup_outputdir(
28
+ path: str | None, warn_if_exist: bool = True, create_dir: bool = True, path_suffix: str | None = None
29
+ ) -> str:
26
30
  is_s3_path = False
27
31
  if path:
28
32
  assert isinstance(path, (str, Path)), (
@@ -41,7 +45,9 @@ def setup_outputdir(path, warn_if_exist=True, create_dir=True, path_suffix=None)
41
45
  else:
42
46
  utcnow = datetime.now(timezone.utc)
43
47
  timestamp = utcnow.strftime("%Y%m%d_%H%M%S")
44
- path = os.path.join("AutogluonModels", f"ag-{timestamp}{path_suffix}")
48
+ path = os.path.join("AutogluonModels", f"ag-{timestamp}")
49
+ if path_suffix:
50
+ path = os.path.join(path, path_suffix)
45
51
  for i in range(1, 1000):
46
52
  try:
47
53
  if create_dir:
@@ -52,10 +58,13 @@ def setup_outputdir(path, warn_if_exist=True, create_dir=True, path_suffix=None)
52
58
  raise FileExistsError
53
59
  break
54
60
  except FileExistsError:
55
- path = os.path.join("AutogluonModels", f"ag-{timestamp}-{i:03d}{path_suffix}")
61
+ path = os.path.join("AutogluonModels", f"ag-{timestamp}-{i:03d}")
62
+ if path_suffix:
63
+ path = os.path.join(path, path_suffix)
56
64
  else:
57
65
  raise RuntimeError("more than 1000 jobs launched in the same second")
58
66
  logger.log(25, f'No path specified. Models will be saved in: "{path}"')
67
+ warn_if_exist = False # Don't warn about the folder existing since we just created it
59
68
 
60
69
  if warn_if_exist and not is_s3_path:
61
70
  try:
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.2.1b20250218"
3
+ __version__ = "1.2.1b20250219"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.common
3
- Version: 1.2.1b20250218
3
+ Version: 1.2.1b20250219
4
4
  Summary: Fast and Accurate ML in 3 Lines of Code
5
5
  Home-page: https://github.com/autogluon/autogluon
6
6
  Author: AutoGluon Community
@@ -42,10 +42,10 @@ Requires-Dist: boto3<2,>=1.10
42
42
  Requires-Dist: psutil<7.0.0,>=5.7.3
43
43
  Requires-Dist: tqdm<5,>=4.38
44
44
  Provides-Extra: tests
45
- Requires-Dist: types-setuptools; extra == "tests"
46
- Requires-Dist: types-requests; extra == "tests"
47
45
  Requires-Dist: pytest-mypy; extra == "tests"
48
46
  Requires-Dist: pytest; extra == "tests"
47
+ Requires-Dist: types-requests; extra == "tests"
48
+ Requires-Dist: types-setuptools; extra == "tests"
49
49
 
50
50
 
51
51
 
@@ -1,8 +1,8 @@
1
- autogluon.common-1.2.1b20250218-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.common-1.2.1b20250219-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/common/__init__.py,sha256=Q0tQ4UOtUEhPpj83k_xzQ9bmtoTSvfg_3WgPi1QopJk,352
3
3
  autogluon/common/dataset.py,sha256=slfU8CxGFNJ86_2wKkT_zPMPr-iPB-sz7klz0YqJECo,1580
4
4
  autogluon/common/space.py,sha256=oRSG-uFmsLACT42mT2vRp3NSuV8MaQz6X4sYwcZruxs,5457
5
- autogluon/common/version.py,sha256=7H9aiBFc3yZ4VAfYTXCxWQ-TNBEjD1nB5tqyO9XpoOs,91
5
+ autogluon/common/version.py,sha256=-6B9LRx5ypsiEngHly5V3KaGydGIcWNulylOlKPbR2U,91
6
6
  autogluon/common/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  autogluon/common/features/feature_metadata.py,sha256=GDvZXyaNkDeuNv8omO4K7tkCPmMdpJzD5rH_hKtZD9E,25783
8
8
  autogluon/common/features/infer_types.py,sha256=MkfVDoY__0Rr__zsDSKszmvYMq5RQRmbNboTG_tm64o,6492
@@ -37,17 +37,17 @@ autogluon/common/utils/multiprocessing_utils.py,sha256=gTbOMnwOrMYaY-NJy1GVS5aIv
37
37
  autogluon/common/utils/nvutil.py,sha256=tVyCdUDoM7RSkO1Ek01NVRFL8bbFnQBryezYpN-BX1M,4804
38
38
  autogluon/common/utils/pandas_utils.py,sha256=sirUUQkKZsmMwmXWEUZJ1n3ZYFQWqwz4iu-tAhZdv68,2432
39
39
  autogluon/common/utils/path_converter.py,sha256=OO0Jr5vhcqrEvZrNqem5tmgC6FZA3_O8sPylQUKUgKs,2441
40
- autogluon/common/utils/resource_utils.py,sha256=ZP6KGh8HliacadptvftL8x4dm_cw0Hwm27BNpN_dTnI,8352
40
+ autogluon/common/utils/resource_utils.py,sha256=CmU8OsaXoreja43gMGRZCg8BiKQdHvDxWW0y7auZE2Q,8456
41
41
  autogluon/common/utils/s3_utils.py,sha256=Tj2VyUGUc7Vrx5KkCGKapvFQyaVvWpJNpjssfXg2Sl4,17142
42
42
  autogluon/common/utils/simulation_utils.py,sha256=iEZcRWzP8xLQ8racIfOGC5V_A0W_xNgxPkGuBfX6hh8,3573
43
43
  autogluon/common/utils/system_info.py,sha256=9BkFcdq1co0EMnZkk_AYdhxSEP3RqcU6uIp-iYx9bdc,4479
44
- autogluon/common/utils/try_import.py,sha256=FVHRwyeUCyJyUEm3GevcTjOeatpIt38AxGSJLaDSvZo,7499
45
- autogluon/common/utils/utils.py,sha256=dxb-OAXBLLw6mPtj0mr4WZbLEJlin8wChZ4hH5LhQ8U,7581
46
- autogluon.common-1.2.1b20250218.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
47
- autogluon.common-1.2.1b20250218.dist-info/METADATA,sha256=u-qEcY3d0ciyDWvs_gTeNl_meyUL4b2GmttFDpfRn6A,11658
48
- autogluon.common-1.2.1b20250218.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
49
- autogluon.common-1.2.1b20250218.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
50
- autogluon.common-1.2.1b20250218.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
51
- autogluon.common-1.2.1b20250218.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
- autogluon.common-1.2.1b20250218.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
53
- autogluon.common-1.2.1b20250218.dist-info/RECORD,,
44
+ autogluon/common/utils/try_import.py,sha256=k_d9RvHs_6ShL5gN7OuVtNHhZZ9BOxz4t6piOkfpug4,7499
45
+ autogluon/common/utils/utils.py,sha256=pdGu5kIZi3UlmdDgIQg6HsPVJIhBT__ZYb2imP6_NZg,7907
46
+ autogluon.common-1.2.1b20250219.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
47
+ autogluon.common-1.2.1b20250219.dist-info/METADATA,sha256=5ft2f34XwHD7WgsaIl1MHzQbLWp-7vWmBvX7IOMpmHg,11658
48
+ autogluon.common-1.2.1b20250219.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
49
+ autogluon.common-1.2.1b20250219.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
50
+ autogluon.common-1.2.1b20250219.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
51
+ autogluon.common-1.2.1b20250219.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
+ autogluon.common-1.2.1b20250219.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
53
+ autogluon.common-1.2.1b20250219.dist-info/RECORD,,