together 1.3.2__py3-none-any.whl → 1.3.3__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.
- together/cli/api/utils.py +15 -8
- {together-1.3.2.dist-info → together-1.3.3.dist-info}/METADATA +1 -1
- {together-1.3.2.dist-info → together-1.3.3.dist-info}/RECORD +6 -6
- {together-1.3.2.dist-info → together-1.3.3.dist-info}/LICENSE +0 -0
- {together-1.3.2.dist-info → together-1.3.3.dist-info}/WHEEL +0 -0
- {together-1.3.2.dist-info → together-1.3.3.dist-info}/entry_points.txt +0 -0
together/cli/api/utils.py
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from gettext import gettext as _
|
|
5
4
|
from typing import Literal
|
|
6
5
|
|
|
6
|
+
import click
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
class AutoIntParamType(click.ParamType):
|
|
9
|
-
name = "
|
|
10
|
+
name = "integer_or_max"
|
|
11
|
+
_number_class = int
|
|
10
12
|
|
|
11
13
|
def convert(
|
|
12
14
|
self, value: str, param: click.Parameter | None, ctx: click.Context | None
|
|
13
15
|
) -> int | Literal["max"] | None:
|
|
14
|
-
if isinstance(value, int):
|
|
15
|
-
return value
|
|
16
|
-
|
|
17
16
|
if value == "max":
|
|
18
17
|
return "max"
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
try:
|
|
19
|
+
return int(value)
|
|
20
|
+
except ValueError:
|
|
21
|
+
self.fail(
|
|
22
|
+
_("{value!r} is not a valid {number_type}.").format(
|
|
23
|
+
value=value, number_type=self.name
|
|
24
|
+
),
|
|
25
|
+
param,
|
|
26
|
+
ctx,
|
|
27
|
+
)
|
|
21
28
|
|
|
22
29
|
|
|
23
30
|
INT_WITH_MAX = AutoIntParamType()
|
|
@@ -9,7 +9,7 @@ together/cli/api/files.py,sha256=QLYEXRkY8J2Gg1SbTCtzGfoTMvosoeACNK83L_oLubs,339
|
|
|
9
9
|
together/cli/api/finetune.py,sha256=rF3PP-BwvrVPPubNn5j-_EToss7sC5pj0-DjsJ7hYxc,12026
|
|
10
10
|
together/cli/api/images.py,sha256=GADSeaNUHUVMtWovmccGuKc28IJ9E_v4vAEwYHJhu5o,2645
|
|
11
11
|
together/cli/api/models.py,sha256=xWEzu8ZpxM_Pz9KEjRPRVuv_v22RayYZ4QcgiezT5tE,1126
|
|
12
|
-
together/cli/api/utils.py,sha256=
|
|
12
|
+
together/cli/api/utils.py,sha256=nWvaCplARQa5e4lrisI8-mwY6031UMaO3wcpVxpUM9I,726
|
|
13
13
|
together/cli/cli.py,sha256=RC0tgapkSOFjsRPg8p-8dx9D2LDzm8YmVCHUjk_aVyQ,1977
|
|
14
14
|
together/client.py,sha256=mOlIFjjE9eSTb0o_weaKJwm8qvWNKHDiMmp8kQ7y68I,4946
|
|
15
15
|
together/constants.py,sha256=6DAvMTrGYI73gUFRbfBdLfDxksucpKjKsiH07PGtSSM,906
|
|
@@ -52,8 +52,8 @@ together/utils/api_helpers.py,sha256=RSF7SRhbjHzroMOSWAXscflByM1r1ta_1SpxkAT22iE
|
|
|
52
52
|
together/utils/files.py,sha256=gMLthqfP5hKxVAerHMdy7gLXzdfY6lyOXdpW24Y4X3I,7165
|
|
53
53
|
together/utils/tools.py,sha256=3-lXWP3cBCzOVSZg9tr5zOT1jaVeKAKVWxO2fcXZTh8,1788
|
|
54
54
|
together/version.py,sha256=p03ivHyE0SyWU4jAnRTBi_sOwywVWoZPU4g2gzRgG-Y,126
|
|
55
|
-
together-1.3.
|
|
56
|
-
together-1.3.
|
|
57
|
-
together-1.3.
|
|
58
|
-
together-1.3.
|
|
59
|
-
together-1.3.
|
|
55
|
+
together-1.3.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
56
|
+
together-1.3.3.dist-info/METADATA,sha256=Cz9xAfH5jrXLw1RxPE25ZFzloe72UGfza2o1ltF_nm8,11829
|
|
57
|
+
together-1.3.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
58
|
+
together-1.3.3.dist-info/entry_points.txt,sha256=G-b5NKW6lUUf1V1fH8IPTBb7jXnK7lhbX9H1zTEJXPs,50
|
|
59
|
+
together-1.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|