Skip to content

Commit

Permalink
Properly override allowed cluster factory arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
carolineechen committed Dec 11, 2024
1 parent 5987483 commit 21f6a8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runhouse/resources/hardware/cluster_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def cluster(
# If the the user changed the image and wants to restart the server to apply the new
# changes, we need to update the image in the cluster object
c.image = image or c.image
if kwargs.get("autostop_mins"):
c.autostop_mins = kwargs.get("autostop_mins")
if launcher:
c.launcher = launcher
if den_auth:
c.save()
return c
Expand Down Expand Up @@ -443,6 +447,8 @@ def ondemand_cluster(
# If the the user changed the image and wants to restart the server to apply the new
# changes, we need to update the image in the cluster object
c.image = image or c.image
c.autostop_mins = autostop_mins or c.autostop_mins
c.launcher = launcher or c.launcher
if den_auth:
c.save()
return c
Expand Down

0 comments on commit 21f6a8c

Please sign in to comment.