Skip to content

Disable smoothing when smoothing cutoff is 0 - #77

Merged
kou merged 1 commit into
enactic:mainfrom
kou:smoothing-cutoff-zero
Oct 6, 2026
Merged

kou merged 1 commit into
enactic:mainfrom
kou:smoothing-cutoff-zero

Conversation

@kou

@kou kou commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

--smoothing-cutoff 0 didn't disable smoothing. _apply_smoothing() clamps the normalized cutoff to 0.01, so 0 applied a ~1.25 Hz low-pass filter. And load_obs(cutoff=0)/load_action(cutoff=0) fell back to the value set by set_smoothing().

Now 0 disables smoothing and a negative cutoff is rejected by set_smoothing().

Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:14
@kou
kou force-pushed the smoothing-cutoff-zero branch from 9fdb03e to 19f0c0c Compare October 6, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Per-call negative cutoffs remain accepted, the action path lacks regression coverage, and the description is missing its required issue reference.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Updates smoothing semantics so a zero cutoff disables filtering.

Changes:

  • Preserves explicit zero cutoffs for observations and actions.
  • Rejects negative configured cutoffs.
  • Adds tests and documentation.

PR description: Missing the required first line Fix GH-${ISSUE_NUMBER}.

File Description
src/​openarm_dataset/​dataset.py Updates smoothing validation and cutoff handling.
src/​openarm_dataset/​convert.py Documents the CLI zero-cutoff behavior.
tests/​test_dataset_0_4_0_qpos.py Tests smoothing disablement and validation.
README.md Documents zero as disabling smoothing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/openarm_dataset/dataset.py
Comment thread tests/test_dataset_0_4_0_qpos.py
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Explicit negative cutoffs passed directly to the loading APIs are silently accepted, and the action-loading path lacks regression coverage.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)

Comment thread README.md
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:22
@kou
kou force-pushed the smoothing-cutoff-zero branch from 19f0c0c to bfdee27 Compare October 6, 2026 06:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The documented None contract conflicts with the type annotation, and zero-cutoff action loading lacks regression coverage.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (2)

Comment thread src/openarm_dataset/dataset.py Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:25
@kou
kou force-pushed the smoothing-cutoff-zero branch from bfdee27 to b283ef4 Compare October 6, 2026 06:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The public API annotation conflicts with its documented None behavior, and the PR description lacks the required issue-linking first line.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

`--smoothing-cutoff 0` didn't disable smoothing. `_apply_smoothing()`
clamps the normalized cutoff to 0.01, so 0 applied a ~1.25 Hz low-pass
filter. And `load_obs(cutoff=0)`/`load_action(cutoff=0)` fell back to
the value set by `set_smoothing()`.

Now 0 disables smoothing and a negative cutoff is rejected by
`set_smoothing()`, `load_obs()` and `load_action()`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:29
@kou
kou force-pushed the smoothing-cutoff-zero branch from b283ef4 to d92b9fd Compare October 6, 2026 06:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The pull request metadata does not yet satisfy the repository's submission requirements.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@shokubutsuu shokubutsuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@kou
kou merged commit fe2d9e0 into enactic:main Oct 6, 2026
8 checks passed
@kou
kou deleted the smoothing-cutoff-zero branch October 6, 2026 07:17
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.

3 participants