crypticorn 2.9.0rc1__py3-none-any.whl → 2.10.1__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.
Files changed (34) hide show
  1. crypticorn/cli/__init__.py +2 -1
  2. crypticorn/cli/__main__.py +2 -1
  3. crypticorn/cli/init.py +22 -7
  4. crypticorn/cli/templates/merge-env.sh +17 -0
  5. crypticorn/cli/version.py +8 -0
  6. crypticorn/common/enums.py +4 -4
  7. crypticorn/common/errors.py +6 -7
  8. crypticorn/common/mixins.py +8 -5
  9. crypticorn/common/openapi.py +9 -10
  10. crypticorn/common/router/admin_router.py +13 -5
  11. crypticorn/common/router/status_router.py +1 -1
  12. crypticorn/hive/client/__init__.py +1 -1
  13. crypticorn/hive/client/api/admin_api.py +30 -27
  14. crypticorn/hive/client/api/data_api.py +36 -18
  15. crypticorn/hive/client/api/models_api.py +87 -72
  16. crypticorn/hive/client/models/__init__.py +1 -1
  17. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  18. crypticorn/hive/client/models/api_error_level.py +1 -1
  19. crypticorn/hive/client/models/api_error_type.py +1 -1
  20. crypticorn/hive/client/models/exception_detail.py +1 -1
  21. crypticorn/hive/client/models/{model.py → model_read.py} +3 -3
  22. crypticorn/metrics/client/api/admin_api.py +14 -14
  23. crypticorn/metrics/client/api/status_api.py +6 -6
  24. crypticorn/metrics/client/models/api_error_identifier.py +1 -1
  25. crypticorn/metrics/client/models/api_error_level.py +1 -1
  26. crypticorn/metrics/client/models/api_error_type.py +1 -1
  27. crypticorn/metrics/client/models/exception_detail.py +1 -1
  28. crypticorn/metrics/client/models/marketcap_ranking.py +2 -2
  29. {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.1.dist-info}/METADATA +20 -5
  30. {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.1.dist-info}/RECORD +34 -31
  31. {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.1.dist-info}/WHEEL +1 -1
  32. crypticorn-2.10.1.dist-info/licenses/LICENSE +15 -0
  33. {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.1.dist-info}/entry_points.txt +0 -0
  34. {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.1.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
1
1
  from crypticorn.cli.init import init_group
2
+ from crypticorn.cli.version import version
2
3
 
3
- __all__ = ["init_group"]
4
+ __all__ = ["init_group", "version"]
@@ -1,7 +1,7 @@
1
1
  # crypticorn/cli.py
2
2
 
3
3
  import click
4
- from crypticorn.cli import init_group
4
+ from crypticorn.cli import init_group, version
5
5
 
6
6
 
7
7
  @click.group()
@@ -11,6 +11,7 @@ def cli():
11
11
 
12
12
 
13
13
  cli.add_command(init_group, name="init")
14
+ cli.add_command(version, name="version")
14
15
 
15
16
  if __name__ == "__main__":
16
17
  cli()
crypticorn/cli/init.py CHANGED
@@ -31,6 +31,13 @@ def copy_template(template_name: str, target_path: Path):
31
31
  click.secho(f"✅ Created: {target_path}", fg="green")
32
32
 
33
33
 
34
+ def check_file_exists(path: Path, force: bool):
35
+ if path.exists() and not force:
36
+ click.secho(f"File already exists, use --force / -f to overwrite", fg="red")
37
+ return False
38
+ return True
39
+
40
+
34
41
  @click.group()
35
42
  def init_group():
36
43
  """Initialize files like CI configs, linters, etc."""
@@ -61,8 +68,7 @@ def init_docker(output, force):
61
68
  click.secho("Output path is a file, please provide a directory path", fg="red")
62
69
  return
63
70
  target = (Path(output) if output else root) / "Dockerfile"
64
- if target.exists() and not force:
65
- click.secho("File already exists, use --force / -f to overwrite", fg="red")
71
+ if not check_file_exists(target, force):
66
72
  return
67
73
  copy_template("Dockerfile", target)
68
74
  click.secho("Make sure to update the Dockerfile", fg="yellow")
@@ -80,13 +86,12 @@ def init_auth(output, force):
80
86
  click.secho("Output path is a file, please provide a directory path", fg="red")
81
87
  return
82
88
  target = (Path(output) if output else root) / "auth.py"
83
- if target.exists() and not force:
84
- click.secho("File already exists, use --force / -f to overwrite", fg="red")
89
+ if not check_file_exists(target, force):
85
90
  return
86
91
  copy_template("auth.py", target)
87
92
  click.secho(
88
93
  """
89
- Make sure to update the .env file with:
94
+ Make sure to update the .env and .env.example files with:
90
95
  IS_DOCKER=0
91
96
  API_ENV=local
92
97
  and the docker-compose.yml file with:
@@ -106,7 +111,17 @@ def init_dependabot(force):
106
111
  """Add dependabot.yml"""
107
112
  root = get_git_root()
108
113
  target = root / ".github/dependabot.yml"
109
- if target.exists() and not force:
110
- click.secho("File already exists, use --force / -f to overwrite", fg="red")
114
+ if not check_file_exists(target, force):
111
115
  return
112
116
  copy_template("dependabot.yml", target)
117
+
118
+
119
+ @init_group.command("merge-env")
120
+ @click.option("-f", "--force", is_flag=True, help="Force overwrite the .env file")
121
+ def init_merge_env(force):
122
+ """Add script to merge environment and file variables into .env"""
123
+ root = get_git_root()
124
+ target = root / "scripts/merge-env.sh"
125
+ if not check_file_exists(target, force):
126
+ return
127
+ copy_template("merge-env.sh", target)
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # this script merges the env variables from the environment and the .env.example file into the .env file
4
+ # the appended variables take precedence over the .env.example variables (if both are set)
5
+
6
+ # Make executable before running in github actions
7
+ # chmod +x scripts/merge-env.sh
8
+
9
+ # Usage in a github action:
10
+ # - name: Generate .env
11
+ # run: ./scripts/merge-env.sh
12
+
13
+ set -e
14
+
15
+ cp .env.example .env
16
+ echo >> .env
17
+ printenv | awk -F= '{print $1"=\""substr($0, index($0,$2))"\""}' >> .env
@@ -0,0 +1,8 @@
1
+ import importlib.metadata
2
+ import click
3
+
4
+
5
+ @click.command("version")
6
+ def version():
7
+ """Print the version of the crypticorn package"""
8
+ click.echo(importlib.metadata.distribution("crypticorn").version)
@@ -1,17 +1,17 @@
1
1
  """Defines common enumerations used throughout the codebase for type safety and consistency."""
2
2
 
3
3
  from enum import StrEnum
4
- from crypticorn.common.mixins import ValidateEnumMixin, ExcludeEnumMixin
4
+ from crypticorn.common.mixins import ValidateEnumMixin
5
5
 
6
6
 
7
- class Exchange(ValidateEnumMixin, ExcludeEnumMixin, StrEnum):
7
+ class Exchange(ValidateEnumMixin, StrEnum):
8
8
  """Supported exchanges for trading"""
9
9
 
10
10
  KUCOIN = "kucoin"
11
11
  BINGX = "bingx"
12
12
 
13
13
 
14
- class InternalExchange(ValidateEnumMixin, ExcludeEnumMixin, StrEnum):
14
+ class InternalExchange(ValidateEnumMixin, StrEnum):
15
15
  """All exchanges we are using, including public (Exchange)"""
16
16
 
17
17
  KUCOIN = "kucoin"
@@ -22,7 +22,7 @@ class InternalExchange(ValidateEnumMixin, ExcludeEnumMixin, StrEnum):
22
22
  BITGET = "bitget"
23
23
 
24
24
 
25
- class MarketType(ValidateEnumMixin, ExcludeEnumMixin, StrEnum):
25
+ class MarketType(ValidateEnumMixin, StrEnum):
26
26
  """
27
27
  Market types
28
28
  """
@@ -2,10 +2,10 @@
2
2
 
3
3
  from enum import Enum, StrEnum
4
4
  from fastapi import status
5
- from crypticorn.common.mixins import ExcludeEnumMixin, ApiErrorFallback
5
+ from crypticorn.common.mixins import ApiErrorFallback
6
6
 
7
7
 
8
- class ApiErrorType(ExcludeEnumMixin, StrEnum):
8
+ class ApiErrorType(StrEnum):
9
9
  """Type of the API error."""
10
10
 
11
11
  USER_ERROR = "user error"
@@ -18,7 +18,7 @@ class ApiErrorType(ExcludeEnumMixin, StrEnum):
18
18
  """error that does not need to be handled or does not affect the program or is a placeholder."""
19
19
 
20
20
 
21
- class ApiErrorIdentifier(ExcludeEnumMixin, StrEnum):
21
+ class ApiErrorIdentifier(StrEnum):
22
22
  """Unique identifier of the API error."""
23
23
 
24
24
  ALLOCATION_BELOW_EXPOSURE = "allocation_below_current_exposure"
@@ -98,13 +98,12 @@ class ApiErrorIdentifier(ExcludeEnumMixin, StrEnum):
98
98
  UNKNOWN_ERROR = "unknown_error_occurred"
99
99
  URL_NOT_FOUND = "requested_resource_not_found"
100
100
 
101
- @property
102
101
  def get_error(self) -> "ApiError":
103
102
  """Get the corresponding ApiError."""
104
- return ApiError[self.value]
103
+ return getattr(ApiError, self.name)
105
104
 
106
105
 
107
- class ApiErrorLevel(ExcludeEnumMixin, StrEnum):
106
+ class ApiErrorLevel(StrEnum):
108
107
  """Level of the API error."""
109
108
 
110
109
  ERROR = "error"
@@ -113,7 +112,7 @@ class ApiErrorLevel(ExcludeEnumMixin, StrEnum):
113
112
  WARNING = "warning"
114
113
 
115
114
 
116
- class ApiError(ExcludeEnumMixin, Enum, metaclass=ApiErrorFallback):
115
+ class ApiError(Enum, metaclass=ApiErrorFallback):
117
116
  # Fallback to UNKNOWN_ERROR for error codes not yet published to PyPI.
118
117
  """Crypticorn API error enumeration."""
119
118
 
@@ -39,10 +39,13 @@ class ValidateEnumMixin:
39
39
  class ExcludeEnumMixin:
40
40
  """(deprecated) Mixin to exclude enum from OpenAPI schema. We use this to avoid duplicating enums when generating client code from the openapi spec."""
41
41
 
42
- warnings.warn(
43
- "The `ExcludeEnumMixin` class is deprecated. Should be removed from enums inheriting this class.",
44
- category=CrypticornDeprecatedSince28,
45
- )
42
+ def __init_subclass__(cls, **kwargs):
43
+ super().__init_subclass__(**kwargs)
44
+ if cls.__name__.startswith("ExcludeEnumMixin"):
45
+ warnings.warn(
46
+ "The `ExcludeEnumMixin` class is deprecated. Should be removed from enums inheriting this class.",
47
+ category=CrypticornDeprecatedSince28,
48
+ )
46
49
 
47
50
  @classmethod
48
51
  def __get_pydantic_json_schema__(cls, core_schema, handler):
@@ -56,7 +59,7 @@ class ApiErrorFallback(EnumMeta):
56
59
 
57
60
  def __getattr__(cls, name):
58
61
  # Let Pydantic/internal stuff pass silently ! fragile
59
- if name.startswith("__"):
62
+ if name.startswith("__") or name.startswith("_pytest"):
60
63
  raise AttributeError(name)
61
64
  _logger.warning(
62
65
  f"Unknown enum member '{name}' - update crypticorn package or check for typos"
@@ -1,11 +1,10 @@
1
1
  default_tags = [
2
- {
3
- "name": "Status",
4
- "description": "These endpoints contain status operations.",
5
- },
6
- {
7
- "name": "Admin",
8
- "description": "These endpoints contain debugging and monitoring operations. They require admin scopes.",
9
- }
10
- ]
11
-
2
+ {
3
+ "name": "Status",
4
+ "description": "These endpoints contain status operations.",
5
+ },
6
+ {
7
+ "name": "Admin",
8
+ "description": "These endpoints contain debugging and monitoring operations. They require admin scopes.",
9
+ },
10
+ ]
@@ -10,8 +10,9 @@ import importlib.metadata
10
10
  import threading
11
11
  import time
12
12
  import psutil
13
+ import re
13
14
  from fastapi import APIRouter, Query
14
- from typing import Literal, Union
15
+ from typing import Literal
15
16
  from crypticorn.common.logging import LogLevel
16
17
  import logging
17
18
 
@@ -86,13 +87,20 @@ def get_container_limits() -> dict:
86
87
  def list_installed_packages(
87
88
  include: list[str] = Query(
88
89
  default=None,
89
- description="List of dependencies to include in the response. If not provided, all installed packages will be returned.",
90
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned.",
90
91
  )
91
- ) -> list:
92
- """Return a list of installed packages and versions."""
92
+ ) -> dict[str, str]:
93
+ """Return a list of installed packages and versions.
94
+
95
+ The include parameter accepts regex patterns to match against package names.
96
+ For example:
97
+ - crypticorn.* will match all packages starting with 'crypticorn'
98
+ - .*tic.* will match all packages containing 'tic' in their name
99
+ """
93
100
  packages = {
94
101
  dist.metadata["Name"]: dist.version
95
102
  for dist in importlib.metadata.distributions()
96
- if include is None or dist.metadata["Name"] in include
103
+ if include is None
104
+ or any(re.match(pattern, dist.metadata["Name"]) for pattern in include)
97
105
  }
98
106
  return dict(sorted(packages.items()))
@@ -13,7 +13,7 @@ router = APIRouter(tags=["Status"], prefix="")
13
13
 
14
14
 
15
15
  @router.get("/", operation_id="ping")
16
- async def ping(request: Request) -> dict:
16
+ async def ping(request: Request) -> str:
17
17
  """
18
18
  Returns 'OK' if the API is running.
19
19
  """
@@ -49,8 +49,8 @@ from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
49
49
  from crypticorn.hive.client.models.exception_detail import ExceptionDetail
50
50
  from crypticorn.hive.client.models.feature_size import FeatureSize
51
51
  from crypticorn.hive.client.models.log_level import LogLevel
52
- from crypticorn.hive.client.models.model import Model
53
52
  from crypticorn.hive.client.models.model_create import ModelCreate
53
+ from crypticorn.hive.client.models.model_read import ModelRead
54
54
  from crypticorn.hive.client.models.model_status import ModelStatus
55
55
  from crypticorn.hive.client.models.model_update import ModelUpdate
56
56
  from crypticorn.hive.client.models.target import Target
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import Field, StrictInt, StrictStr, field_validator
20
- from typing import Any, Dict, List, Optional
19
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
20
+ from typing import Any, Dict, List, Optional, Union
21
21
  from typing_extensions import Annotated
22
22
  from crypticorn.hive.client.models.log_level import LogLevel
23
23
 
@@ -271,7 +271,7 @@ class AdminApi:
271
271
  include: Annotated[
272
272
  Optional[List[StrictStr]],
273
273
  Field(
274
- description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
274
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
275
275
  ),
276
276
  ] = None,
277
277
  _request_timeout: Union[
@@ -285,12 +285,12 @@ class AdminApi:
285
285
  _content_type: Optional[StrictStr] = None,
286
286
  _headers: Optional[Dict[StrictStr, Any]] = None,
287
287
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
288
- ) -> List[object]:
288
+ ) -> Dict[str, str]:
289
289
  """List Installed Packages
290
290
 
291
- Return a list of installed packages and versions.
291
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
292
292
 
293
- :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
293
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
294
294
  :type include: List[str]
295
295
  :param _request_timeout: timeout setting for this request. If one
296
296
  number provided, it will be total request
@@ -323,7 +323,7 @@ class AdminApi:
323
323
  )
324
324
 
325
325
  _response_types_map: Dict[str, Optional[str]] = {
326
- "200": "List[object]",
326
+ "200": "Dict[str, str]",
327
327
  }
328
328
  response_data = await self.api_client.call_api(
329
329
  *_param, _request_timeout=_request_timeout
@@ -340,7 +340,7 @@ class AdminApi:
340
340
  include: Annotated[
341
341
  Optional[List[StrictStr]],
342
342
  Field(
343
- description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
343
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
344
344
  ),
345
345
  ] = None,
346
346
  _request_timeout: Union[
@@ -354,12 +354,12 @@ class AdminApi:
354
354
  _content_type: Optional[StrictStr] = None,
355
355
  _headers: Optional[Dict[StrictStr, Any]] = None,
356
356
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
357
- ) -> ApiResponse[List[object]]:
357
+ ) -> ApiResponse[Dict[str, str]]:
358
358
  """List Installed Packages
359
359
 
360
- Return a list of installed packages and versions.
360
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
361
361
 
362
- :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
362
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
363
363
  :type include: List[str]
364
364
  :param _request_timeout: timeout setting for this request. If one
365
365
  number provided, it will be total request
@@ -392,7 +392,7 @@ class AdminApi:
392
392
  )
393
393
 
394
394
  _response_types_map: Dict[str, Optional[str]] = {
395
- "200": "List[object]",
395
+ "200": "Dict[str, str]",
396
396
  }
397
397
  response_data = await self.api_client.call_api(
398
398
  *_param, _request_timeout=_request_timeout
@@ -409,7 +409,7 @@ class AdminApi:
409
409
  include: Annotated[
410
410
  Optional[List[StrictStr]],
411
411
  Field(
412
- description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
412
+ description="List of regex patterns to match against package names. If not provided, all installed packages will be returned."
413
413
  ),
414
414
  ] = None,
415
415
  _request_timeout: Union[
@@ -426,9 +426,9 @@ class AdminApi:
426
426
  ) -> RESTResponseType:
427
427
  """List Installed Packages
428
428
 
429
- Return a list of installed packages and versions.
429
+ Return a list of installed packages and versions. The include parameter accepts regex patterns to match against package names. For example: - crypticorn.* will match all packages starting with 'crypticorn' - .*tic.* will match all packages containing 'tic' in their name
430
430
 
431
- :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
431
+ :param include: List of regex patterns to match against package names. If not provided, all installed packages will be returned.
432
432
  :type include: List[str]
433
433
  :param _request_timeout: timeout setting for this request. If one
434
434
  number provided, it will be total request
@@ -461,7 +461,7 @@ class AdminApi:
461
461
  )
462
462
 
463
463
  _response_types_map: Dict[str, Optional[str]] = {
464
- "200": "List[object]",
464
+ "200": "Dict[str, str]",
465
465
  }
466
466
  response_data = await self.api_client.call_api(
467
467
  *_param, _request_timeout=_request_timeout
@@ -541,9 +541,9 @@ class AdminApi:
541
541
  _headers: Optional[Dict[StrictStr, Any]] = None,
542
542
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
543
543
  ) -> LogLevel:
544
- """Get Logging Level
544
+ """(Deprecated) Get Logging Level
545
545
 
546
- Get the log level of the server logger.
546
+ Get the log level of the server logger. Will be removed in a future release.
547
547
 
548
548
  :param _request_timeout: timeout setting for this request. If one
549
549
  number provided, it will be total request
@@ -566,6 +566,7 @@ class AdminApi:
566
566
  :type _host_index: int, optional
567
567
  :return: Returns the result object.
568
568
  """ # noqa: E501
569
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
569
570
 
570
571
  _param = self._get_log_level_serialize(
571
572
  _request_auth=_request_auth,
@@ -601,9 +602,9 @@ class AdminApi:
601
602
  _headers: Optional[Dict[StrictStr, Any]] = None,
602
603
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
603
604
  ) -> ApiResponse[LogLevel]:
604
- """Get Logging Level
605
+ """(Deprecated) Get Logging Level
605
606
 
606
- Get the log level of the server logger.
607
+ Get the log level of the server logger. Will be removed in a future release.
607
608
 
608
609
  :param _request_timeout: timeout setting for this request. If one
609
610
  number provided, it will be total request
@@ -626,6 +627,7 @@ class AdminApi:
626
627
  :type _host_index: int, optional
627
628
  :return: Returns the result object.
628
629
  """ # noqa: E501
630
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
629
631
 
630
632
  _param = self._get_log_level_serialize(
631
633
  _request_auth=_request_auth,
@@ -661,9 +663,9 @@ class AdminApi:
661
663
  _headers: Optional[Dict[StrictStr, Any]] = None,
662
664
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
663
665
  ) -> RESTResponseType:
664
- """Get Logging Level
666
+ """(Deprecated) Get Logging Level
665
667
 
666
- Get the log level of the server logger.
668
+ Get the log level of the server logger. Will be removed in a future release.
667
669
 
668
670
  :param _request_timeout: timeout setting for this request. If one
669
671
  number provided, it will be total request
@@ -686,6 +688,7 @@ class AdminApi:
686
688
  :type _host_index: int, optional
687
689
  :return: Returns the result object.
688
690
  """ # noqa: E501
691
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
689
692
 
690
693
  _param = self._get_log_level_serialize(
691
694
  _request_auth=_request_auth,
@@ -767,7 +770,7 @@ class AdminApi:
767
770
  _content_type: Optional[StrictStr] = None,
768
771
  _headers: Optional[Dict[StrictStr, Any]] = None,
769
772
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
770
- ) -> int:
773
+ ) -> float:
771
774
  """Get Memory Usage
772
775
 
773
776
  Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
@@ -802,7 +805,7 @@ class AdminApi:
802
805
  )
803
806
 
804
807
  _response_types_map: Dict[str, Optional[str]] = {
805
- "200": "int",
808
+ "200": "float",
806
809
  }
807
810
  response_data = await self.api_client.call_api(
808
811
  *_param, _request_timeout=_request_timeout
@@ -827,7 +830,7 @@ class AdminApi:
827
830
  _content_type: Optional[StrictStr] = None,
828
831
  _headers: Optional[Dict[StrictStr, Any]] = None,
829
832
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
830
- ) -> ApiResponse[int]:
833
+ ) -> ApiResponse[float]:
831
834
  """Get Memory Usage
832
835
 
833
836
  Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
@@ -862,7 +865,7 @@ class AdminApi:
862
865
  )
863
866
 
864
867
  _response_types_map: Dict[str, Optional[str]] = {
865
- "200": "int",
868
+ "200": "float",
866
869
  }
867
870
  response_data = await self.api_client.call_api(
868
871
  *_param, _request_timeout=_request_timeout
@@ -922,7 +925,7 @@ class AdminApi:
922
925
  )
923
926
 
924
927
  _response_types_map: Dict[str, Optional[str]] = {
925
- "200": "int",
928
+ "200": "float",
926
929
  }
927
930
  response_data = await self.api_client.call_api(
928
931
  *_param, _request_timeout=_request_timeout
@@ -44,14 +44,20 @@ class DataApi:
44
44
  @validate_call
45
45
  async def download_data(
46
46
  self,
47
- model_id: Annotated[StrictInt, Field(description="Model ID")],
47
+ model_id: Annotated[
48
+ StrictInt, Field(description="The ID of the model to download data for.")
49
+ ],
48
50
  version: Annotated[
49
51
  Optional[DataVersion],
50
- Field(description="Data version. Default is the latest public version."),
52
+ Field(
53
+ description="The version of the data to download. Default is the latest public version."
54
+ ),
51
55
  ] = None,
52
56
  feature_size: Annotated[
53
57
  Optional[FeatureSize],
54
- Field(description="The number of features in the data. Default is LARGE."),
58
+ Field(
59
+ description="The number of features in the data. Default is `LARGE`."
60
+ ),
55
61
  ] = None,
56
62
  _request_timeout: Union[
57
63
  None,
@@ -69,11 +75,11 @@ class DataApi:
69
75
 
70
76
  Get download links for model training data
71
77
 
72
- :param model_id: Model ID (required)
78
+ :param model_id: The ID of the model to download data for. (required)
73
79
  :type model_id: int
74
- :param version: Data version. Default is the latest public version.
80
+ :param version: The version of the data to download. Default is the latest public version.
75
81
  :type version: DataVersion
76
- :param feature_size: The number of features in the data. Default is LARGE.
82
+ :param feature_size: The number of features in the data. Default is `LARGE`.
77
83
  :type feature_size: FeatureSize
78
84
  :param _request_timeout: timeout setting for this request. If one
79
85
  number provided, it will be total request
@@ -122,14 +128,20 @@ class DataApi:
122
128
  @validate_call
123
129
  async def download_data_with_http_info(
124
130
  self,
125
- model_id: Annotated[StrictInt, Field(description="Model ID")],
131
+ model_id: Annotated[
132
+ StrictInt, Field(description="The ID of the model to download data for.")
133
+ ],
126
134
  version: Annotated[
127
135
  Optional[DataVersion],
128
- Field(description="Data version. Default is the latest public version."),
136
+ Field(
137
+ description="The version of the data to download. Default is the latest public version."
138
+ ),
129
139
  ] = None,
130
140
  feature_size: Annotated[
131
141
  Optional[FeatureSize],
132
- Field(description="The number of features in the data. Default is LARGE."),
142
+ Field(
143
+ description="The number of features in the data. Default is `LARGE`."
144
+ ),
133
145
  ] = None,
134
146
  _request_timeout: Union[
135
147
  None,
@@ -147,11 +159,11 @@ class DataApi:
147
159
 
148
160
  Get download links for model training data
149
161
 
150
- :param model_id: Model ID (required)
162
+ :param model_id: The ID of the model to download data for. (required)
151
163
  :type model_id: int
152
- :param version: Data version. Default is the latest public version.
164
+ :param version: The version of the data to download. Default is the latest public version.
153
165
  :type version: DataVersion
154
- :param feature_size: The number of features in the data. Default is LARGE.
166
+ :param feature_size: The number of features in the data. Default is `LARGE`.
155
167
  :type feature_size: FeatureSize
156
168
  :param _request_timeout: timeout setting for this request. If one
157
169
  number provided, it will be total request
@@ -200,14 +212,20 @@ class DataApi:
200
212
  @validate_call
201
213
  async def download_data_without_preload_content(
202
214
  self,
203
- model_id: Annotated[StrictInt, Field(description="Model ID")],
215
+ model_id: Annotated[
216
+ StrictInt, Field(description="The ID of the model to download data for.")
217
+ ],
204
218
  version: Annotated[
205
219
  Optional[DataVersion],
206
- Field(description="Data version. Default is the latest public version."),
220
+ Field(
221
+ description="The version of the data to download. Default is the latest public version."
222
+ ),
207
223
  ] = None,
208
224
  feature_size: Annotated[
209
225
  Optional[FeatureSize],
210
- Field(description="The number of features in the data. Default is LARGE."),
226
+ Field(
227
+ description="The number of features in the data. Default is `LARGE`."
228
+ ),
211
229
  ] = None,
212
230
  _request_timeout: Union[
213
231
  None,
@@ -225,11 +243,11 @@ class DataApi:
225
243
 
226
244
  Get download links for model training data
227
245
 
228
- :param model_id: Model ID (required)
246
+ :param model_id: The ID of the model to download data for. (required)
229
247
  :type model_id: int
230
- :param version: Data version. Default is the latest public version.
248
+ :param version: The version of the data to download. Default is the latest public version.
231
249
  :type version: DataVersion
232
- :param feature_size: The number of features in the data. Default is LARGE.
250
+ :param feature_size: The number of features in the data. Default is `LARGE`.
233
251
  :type feature_size: FeatureSize
234
252
  :param _request_timeout: timeout setting for this request. If one
235
253
  number provided, it will be total request