fix(argo): auto-adjust n-initial when trials < 5
Hyperopt requires trials > n_initial. When running quick smoke tests with few trials, auto-reduce n_initial to trials-1 so workflows don't fail with "trials must be greater than n_initial". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -155,11 +155,17 @@ spec:
|
||||
*) BINARY=hyperopt_baseline_supervised ;;
|
||||
esac
|
||||
|
||||
echo "Running $BINARY --model $MODEL ({{workflow.parameters.hyperopt-trials}} trials x {{workflow.parameters.hyperopt-epochs}} epochs)"
|
||||
TRIALS={{workflow.parameters.hyperopt-trials}}
|
||||
N_INITIAL=5
|
||||
if [ "$TRIALS" -le "$N_INITIAL" ]; then
|
||||
N_INITIAL=$((TRIALS > 1 ? TRIALS - 1 : 1))
|
||||
fi
|
||||
|
||||
echo "Running $BINARY --model $MODEL ($TRIALS trials, $N_INITIAL initial x {{workflow.parameters.hyperopt-epochs}} epochs)"
|
||||
$BINARY \
|
||||
--model "$MODEL" \
|
||||
--trials {{workflow.parameters.hyperopt-trials}} \
|
||||
--n-initial 5 \
|
||||
--trials "$TRIALS" \
|
||||
--n-initial "$N_INITIAL" \
|
||||
--epochs {{workflow.parameters.hyperopt-epochs}} \
|
||||
--parallel 0 \
|
||||
--symbol {{workflow.parameters.symbol}} \
|
||||
|
||||
Reference in New Issue
Block a user