Skip to content

Commit f80a2b0

Browse files
fix(jig): deployment tracking (#300)
* fix: deployment tracking * skip tracking on update if state is not updating * skip tracking when status ready instead of when status is not updating * move track condition --------- Co-authored-by: technillogue <[email protected]>
1 parent bffe187 commit f80a2b0

File tree

1 file changed

+5
-3
lines changed
  • src/together/lib/cli/api/beta/jig

1 file changed

+5
-3
lines changed

src/together/lib/cli/api/beta/jig/jig.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,11 @@ def deploy(
658658
echo(json.dumps(deploy_data, indent=2))
659659
echo(f"Deploying model: {self.name}")
660660

661+
no_track = False
662+
661663
try:
662664
response = self.api.update(self.name, **deploy_data)
665+
no_track = str(response.status) == "Ready"
663666
echo("\N{CHECK MARK} Applied new deployment configuration")
664667
except NotFoundError:
665668
try:
@@ -670,12 +673,11 @@ def deploy(
670673
raise JigError(f"Deployment name must be unique. Tip: {self.config._unique_name_hint}") from None
671674
raise
672675

673-
if detach:
676+
if detach or no_track:
674677
echo(json.dumps(response.model_dump(), indent=2))
675678
return
676679

677-
if str(response.status) == "Updating":
678-
self.track(response)
680+
self.track(response)
679681

680682
def track(self, d: Deployment) -> None:
681683
"""Poll deployment until first replica ready, failure, or timeout"""

0 commit comments

Comments
 (0)