@@ -334,32 +334,38 @@ def _run(self, strategy: Strategy, schedule: Schedule, # noqa: C901
334334 "rollbacks" , {}).get ("strategy" , "default" )
335335 logger .info ("Rollbacks strategy: {}" .format (rollback_strategy ))
336336
337+ with_ssh = has_steady_state_hypothesis_with_probes (experiment )
338+ if not with_ssh :
339+ logger .info (
340+ "No steady state hypothesis defined. That's ok, just "
341+ "exploring." )
342+
337343 try :
338344 try :
339345 control .begin (
340346 "experiment" , experiment , experiment , configuration ,
341347 secrets )
342348
343349 state = object ()
344- if should_run_before_method (strategy ):
350+ if with_ssh and should_run_before_method (strategy ):
345351 state = run_gate_hypothesis (
346352 experiment , journal , configuration , secrets ,
347353 event_registry , dry )
348354
349355 if state is not None :
350- if should_run_during_method (strategy ):
356+ if with_ssh and should_run_during_method (strategy ):
351357 run_hypothesis_during_method (
352358 hypo_pool , continous_hypo_event , strategy ,
353359 schedule , experiment , journal , configuration ,
354360 secrets , event_registry , dry )
355361
356362 state = run_method (
357- strategy , activity_pool , experiment , journal ,
358- configuration , secrets , event_registry , dry )
363+ strategy , activity_pool , experiment , journal ,
364+ configuration , secrets , event_registry , dry )
359365
360366 continous_hypo_event .set ()
361367 if journal ["status" ] not in ["interrupted" , "aborted" ]:
362- if state is not None and \
368+ if with_ssh and ( state is not None ) and \
363369 should_run_after_method (strategy ):
364370 run_deviation_validation_hypothesis (
365371 experiment , journal , configuration , secrets ,
@@ -522,6 +528,7 @@ def run_method(strategy: Strategy, activity_pool: ThreadPoolExecutor,
522528 configuration : Configuration , secrets : Secrets ,
523529 event_registry : EventHandlerRegistry ,
524530 dry : bool = False ) -> Optional [List [Run ]]:
531+ logger .info ("Playing your experiment's method now..." )
525532 event_registry .start_method (experiment )
526533 try :
527534 state = apply_activities (
@@ -760,3 +767,12 @@ def apply_rollbacks(experiment: Experiment, configuration: Configuration,
760767 control .with_state (result )
761768
762769 return result
770+
771+
772+ def has_steady_state_hypothesis_with_probes (experiment : Experiment ) -> bool :
773+ steady_state_hypothesis = experiment .get ("steady-state-hypothesis" )
774+ if steady_state_hypothesis :
775+ probes = steady_state_hypothesis .get ("probes" )
776+ if probes :
777+ return len (probes ) > 0
778+ return False
0 commit comments