Skip to content

fix: drop duplicate session params from generated task template (#2)#8

Merged
alexevag merged 1 commit into
mainfrom
fix/issue-2-session-params-duplication
May 11, 2026
Merged

fix: drop duplicate session params from generated task template (#2)#8
alexevag merged 1 commit into
mainfrom
fix/issue-2-session-params-duplication

Conversation

@alexevag
Copy link
Copy Markdown
Collaborator

@alexevag alexevag commented May 11, 2026

Summary

  • ethopy-create-task was emitting max_reward, min_reward, and hydrate_delay in both session_params and experiment_conditions for MatchPort + MultiPort templates (and any experiment whose default_key overlaps with SessionParameters).
  • Fix filters the experiment params dict against SessionParameters.__annotations__ before formatting, using the existing dataclass as the single source of truth so future session keys are stripped automatically.

Closes #2

Test plan

  • Run ethopy-create-task with experiment experiments.match_port / behavior behaviors.multi_port and confirm experiment_conditions no longer contains max_reward, min_reward, or hydrate_delay.
  • Confirm session_params block still contains those keys.
  • Confirm other experiment keys (trial_selection, init_ready, trial_duration, ...) are still emitted.

🤖 Generated with Claude Code

)

Session-wide keys (max_reward, min_reward, hydrate_delay, ...) live in
both SessionParameters and the experiment default_key by design, but the
ethopy-create-task template was emitting them in both session_params and
experiment_conditions. Filter exp_params against SessionParameters
annotations so each key appears in exactly one place.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@alexevag alexevag merged commit 6c1375a into main May 11, 2026
1 check passed
@alexevag alexevag deleted the fix/issue-2-session-params-duplication branch May 11, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Session parameters appear multiple times in configuration task

1 participant