Skip to content

Commit 9c2b1cf

Browse files
committed
Fix: fix throttling while calling disassociate trial component in autoPilot
1 parent 7ed08cf commit 9c2b1cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/smexperiments/trial_component.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# language governing permissions and limitations under the License.
1313
"""Contains the TrialComponent class."""
1414
from smexperiments import _base_types, api_types
15+
import time
1516

1617

1718
class TrialComponent(_base_types.Record):
@@ -127,6 +128,8 @@ def delete(self, force_disassociate=None):
127128

128129
# Disassociate the trials and trial components
129130
for trial in list_trials_response["TrialSummaries"]:
131+
# to prevent DisassociateTrialComponent throttling
132+
time.sleep(1.2)
130133
self.sagemaker_boto_client.disassociate_trial_component(
131134
TrialName=trial["TrialName"], TrialComponentName=self.trial_component_name
132135
)

0 commit comments

Comments
 (0)