truefoundry 0.4.2rc1__py3-none-any.whl → 0.4.2rc2__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.
Potentially problematic release.
This version of truefoundry might be problematic. Click here for more details.
- truefoundry/deploy/auto_gen/models.py +11 -5
- truefoundry/ml/mlfoundry_run.py +29 -14
- {truefoundry-0.4.2rc1.dist-info → truefoundry-0.4.2rc2.dist-info}/METADATA +1 -1
- {truefoundry-0.4.2rc1.dist-info → truefoundry-0.4.2rc2.dist-info}/RECORD +6 -6
- {truefoundry-0.4.2rc1.dist-info → truefoundry-0.4.2rc2.dist-info}/WHEEL +0 -0
- {truefoundry-0.4.2rc1.dist-info → truefoundry-0.4.2rc2.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: application.json
|
|
3
|
-
# timestamp: 2024-
|
|
3
|
+
# timestamp: 2024-10-09T13:00:44+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -363,10 +363,12 @@ class HelmRepo(BaseModel):
|
|
|
363
363
|
description="+label=Helm repository URL\n+sort=1\n+message=Needs to be a valid URL.",
|
|
364
364
|
)
|
|
365
365
|
chart: str = Field(
|
|
366
|
-
...,
|
|
366
|
+
...,
|
|
367
|
+
description='+label=Chart name\n+sort=2\n+usage=The helm chart name\n+uiType=InputSelect\n+uiProps={"creatable":true, "searchable":true}',
|
|
367
368
|
)
|
|
368
369
|
version: str = Field(
|
|
369
|
-
...,
|
|
370
|
+
...,
|
|
371
|
+
description='+label=Version\n+sort=3\n+usage=Helm chart version\n+uiType=InputSelect\n+uiProps={"creatable":true, "searchable":true}',
|
|
370
372
|
)
|
|
371
373
|
|
|
372
374
|
|
|
@@ -448,10 +450,14 @@ class JobAlert(BaseModel):
|
|
|
448
450
|
+label=Alert
|
|
449
451
|
"""
|
|
450
452
|
|
|
451
|
-
notification_channel:
|
|
453
|
+
notification_channel: constr(min_length=1) = Field(
|
|
452
454
|
...,
|
|
453
455
|
description='+label=Notification Channel\n+usage=Specify the notification channel to send alerts to\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"notification-channel"}\n+sort=660',
|
|
454
456
|
)
|
|
457
|
+
to_emails: Optional[List[constr(min_length=1)]] = Field(
|
|
458
|
+
None,
|
|
459
|
+
description="+label=To Emails\n+usage=List of recipients' email addresses if the notification channel is Email.\n+docs=Specify the emails to send alerts to\n+sort=665",
|
|
460
|
+
)
|
|
455
461
|
on_start: bool = Field(
|
|
456
462
|
False,
|
|
457
463
|
description="+label=On Start\n+usage=Send an alert when the job starts\n+sort=670",
|
|
@@ -1546,7 +1552,7 @@ class SSHServer(BaseWorkbenchInput):
|
|
|
1546
1552
|
image: WorkbenchImage
|
|
1547
1553
|
ssh_public_key: str = Field(
|
|
1548
1554
|
...,
|
|
1549
|
-
description="+label: SSH Public Key\n+usage=Add Your SSH Public Key, this will be used to authenticate you to the SSH Server.
|
|
1555
|
+
description="+label: SSH Public Key\n+usage=Add Your SSH Public Key, this will be used to authenticate you to the SSH Server. \\\nYou can find it using `cat ~/.ssh/id_rsa.pub` in Mac/Linux or `type $home\\.ssh\\id_rsa.pub` in Windows Powershell. \\\nYou can also generate a new SSH key pair using `ssh-keygen -t rsa` in your local terminal. (same for both Mac/Linux and Windows Powershell)\n+uiType=TextArea\n+sort=4",
|
|
1550
1556
|
)
|
|
1551
1557
|
|
|
1552
1558
|
|
truefoundry/ml/mlfoundry_run.py
CHANGED
|
@@ -52,6 +52,8 @@ from truefoundry.ml.run_utils import ParamsType, flatten_dict, process_params
|
|
|
52
52
|
from truefoundry.ml.session import ACTIVE_RUNS, _get_api_client, get_active_session
|
|
53
53
|
from truefoundry.ml.validation_utils import (
|
|
54
54
|
MAX_ENTITY_KEY_LENGTH,
|
|
55
|
+
MAX_METRICS_PER_BATCH,
|
|
56
|
+
MAX_PARAMS_TAGS_PER_BATCH,
|
|
55
57
|
_validate_batch_log_data,
|
|
56
58
|
)
|
|
57
59
|
|
|
@@ -638,12 +640,16 @@ class MlFoundryRun:
|
|
|
638
640
|
return
|
|
639
641
|
|
|
640
642
|
try:
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
for i in range(0, len(metrics), MAX_METRICS_PER_BATCH):
|
|
644
|
+
metrics_batch = metrics[i : i + MAX_METRICS_PER_BATCH]
|
|
645
|
+
|
|
646
|
+
_validate_batch_log_data(metrics=metrics_batch, params=[], tags=[])
|
|
647
|
+
|
|
648
|
+
self._runs_api.log_run_batch_post(
|
|
649
|
+
log_batch_request_dto=LogBatchRequestDto(
|
|
650
|
+
run_id=self.run_id, metrics=metrics_batch, params=[], tags=[]
|
|
651
|
+
)
|
|
645
652
|
)
|
|
646
|
-
)
|
|
647
653
|
except Exception as e:
|
|
648
654
|
raise MlFoundryException(str(e)) from e
|
|
649
655
|
|
|
@@ -725,12 +731,17 @@ class MlFoundryRun:
|
|
|
725
731
|
if len(params) == 0:
|
|
726
732
|
logger.warning("Cannot log empty params dictionary")
|
|
727
733
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
734
|
+
for i in range(0, len(params), MAX_PARAMS_TAGS_PER_BATCH):
|
|
735
|
+
params_batch = params[i : i + MAX_PARAMS_TAGS_PER_BATCH]
|
|
736
|
+
|
|
737
|
+
_validate_batch_log_data(metrics=[], params=params_batch, tags=[])
|
|
738
|
+
logger.debug("Logging parameters: %s", params_batch)
|
|
739
|
+
|
|
740
|
+
self._runs_api.log_run_batch_post(
|
|
741
|
+
log_batch_request_dto=LogBatchRequestDto(
|
|
742
|
+
run_id=self.run_id, metrics=[], params=params_batch, tags=[]
|
|
743
|
+
)
|
|
732
744
|
)
|
|
733
|
-
)
|
|
734
745
|
except Exception as e:
|
|
735
746
|
raise MlFoundryException(str(e)) from e
|
|
736
747
|
logger.info("Parameters logged successfully")
|
|
@@ -767,11 +778,15 @@ class MlFoundryRun:
|
|
|
767
778
|
tags_arr = [
|
|
768
779
|
RunTagDto(key=key, value=str(value)) for key, value in tags.items()
|
|
769
780
|
]
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
781
|
+
for i in range(0, len(tags_arr), MAX_PARAMS_TAGS_PER_BATCH):
|
|
782
|
+
tags_batch = tags_arr[i : i + MAX_PARAMS_TAGS_PER_BATCH]
|
|
783
|
+
|
|
784
|
+
_validate_batch_log_data(metrics=[], params=[], tags=tags_batch)
|
|
785
|
+
self._runs_api.log_run_batch_post(
|
|
786
|
+
log_batch_request_dto=LogBatchRequestDto(
|
|
787
|
+
run_id=self.run_id, metrics=[], params=[], tags=tags_batch
|
|
788
|
+
)
|
|
773
789
|
)
|
|
774
|
-
)
|
|
775
790
|
except Exception as e:
|
|
776
791
|
raise MlFoundryException(str(e)) from e
|
|
777
792
|
logger.info("Tags set successfully")
|
|
@@ -36,7 +36,7 @@ truefoundry/common/request_utils.py,sha256=-ss8033PClJOMJuS5Ue1zCFRVK7ZW9vjtva1b
|
|
|
36
36
|
truefoundry/common/servicefoundry_client.py,sha256=qYSrsbFH8b7N_2oxlXfbJnWfdqHCBQ1dQ5Rr2tdp3zQ,2937
|
|
37
37
|
truefoundry/common/utils.py,sha256=f5Av8X70vZf6eUK4Axm8q75It2-C-3o3uomA0GrFt_4,2506
|
|
38
38
|
truefoundry/deploy/__init__.py,sha256=ugawKF2G02EmEXX35oZ2tec12d9oWN28Sf6mtGGIERY,2281
|
|
39
|
-
truefoundry/deploy/auto_gen/models.py,sha256=
|
|
39
|
+
truefoundry/deploy/auto_gen/models.py,sha256=AjbjNFwWDTIOjN_E1fSUgP-ej9nsb2OpZPhsnIRAVGs,80621
|
|
40
40
|
truefoundry/deploy/builder/__init__.py,sha256=a1qR6nicHGcxRaeNTxWRsmDs8zsmXc7j13-I8q0qqVk,4938
|
|
41
41
|
truefoundry/deploy/builder/builders/__init__.py,sha256=tlFLXqyDaKLd4iZbo4Hcu_8gOmgtL6drnXpbmQ6x1P8,636
|
|
42
42
|
truefoundry/deploy/builder/builders/dockerfile.py,sha256=AXXTziCkaqIhuM_bwyD1vT1znOwemN1TKgU7eyo-KuM,1522
|
|
@@ -323,7 +323,7 @@ truefoundry/ml/log_types/pydantic_base.py,sha256=eBlw_AEyAz4iJKDP4zgJOCFWcldwQqp
|
|
|
323
323
|
truefoundry/ml/log_types/utils.py,sha256=xjJ21jdPScvFmw3TbVh5NCzbzJwaqiXJyiiT4xxX1EI,335
|
|
324
324
|
truefoundry/ml/logger.py,sha256=VT-BF3BnBYTWVq87O58F0c8uXMu94gYzsiFlGY3_7Ao,458
|
|
325
325
|
truefoundry/ml/mlfoundry_api.py,sha256=I2T8tXeAIWpD8EH05fm80mNyX6cs2S1ORI4qoo0HTpQ,60847
|
|
326
|
-
truefoundry/ml/mlfoundry_run.py,sha256=
|
|
326
|
+
truefoundry/ml/mlfoundry_run.py,sha256=rNJl130iJkpjW3MNoe5-d_J9VJJQBqWHEJCfYeiZCbE,45123
|
|
327
327
|
truefoundry/ml/run_utils.py,sha256=dzbQ_TGkSCYO-gg8tlr5tglR0p2SIQdy0wl4IEQE5JA,2899
|
|
328
328
|
truefoundry/ml/session.py,sha256=_WmaGNiZCwQVmB-brbX-z38nFvuqP8f7jGxfqJoq3TM,5385
|
|
329
329
|
truefoundry/ml/validation_utils.py,sha256=XBSUd9OoyriWJpT3M5LKz17iWY3yVMr3hM5vdaVjtf0,12082
|
|
@@ -340,7 +340,7 @@ truefoundry/workflow/map_task.py,sha256=2m3qGXQ90k9LdS45q8dqCCECc3qr8t2m_LMCVd1m
|
|
|
340
340
|
truefoundry/workflow/python_task.py,sha256=SRXRLC4vdBqGjhkwuaY39LEWN6iPCpJAuW17URRdWTY,1128
|
|
341
341
|
truefoundry/workflow/task.py,sha256=ToitYiKcNzFCtOVQwz1W8sRjbR97eVS7vQBdbgUQtKg,1779
|
|
342
342
|
truefoundry/workflow/workflow.py,sha256=WaTqUjhwfAXDWu4E5ehuwAxrCbDJkoAf1oWmR2E9Qy0,4575
|
|
343
|
-
truefoundry-0.4.
|
|
344
|
-
truefoundry-0.4.
|
|
345
|
-
truefoundry-0.4.
|
|
346
|
-
truefoundry-0.4.
|
|
343
|
+
truefoundry-0.4.2rc2.dist-info/METADATA,sha256=8wBExyVvKXs8p3xYsQf8p6uGf8Mb16m8DK2GlgHt78o,3140
|
|
344
|
+
truefoundry-0.4.2rc2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
345
|
+
truefoundry-0.4.2rc2.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
|
|
346
|
+
truefoundry-0.4.2rc2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|