Skip to content

Yh cyber windowed blending sampler - #53

Open
yh-cyber wants to merge 35 commits into
mainfrom
yh-cyber-windowed-blending-sampler
Open

Yh cyber windowed blending sampler#53
yh-cyber wants to merge 35 commits into
mainfrom
yh-cyber-windowed-blending-sampler

Conversation

@yh-cyber

@yh-cyber yh-cyber commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Validation

  • scripts/quality-check.sh passes locally
  • Appropriate /test commands were run and are passing (e.g. /test gpu)
  • Unit tests were added / e2e tests were added where applicable
  • Manual testing, if applicable (describe further): added test_sampler file to add unit tests, all pass

Checklist

  • The change is focused and easy to review.
  • Tests were added or updated for behaviour changes.
  • No secrets, generated files, or files that only make sense on my machine are included.
  • Relevant documentation is updated.

Additional Comments

I think there might be something wrong with scripts/quality-check.sh for me.

This is what I got when I ran scripts/quality-check.sh

$ scripts/quality-check.sh
==> Checking formatting (ruff format --check)
17 files already formatted

==> Checking code style (ruff check)
error: a value is required for '[FILES]...' but none was supplied

For more information, try '--help'.

Found style problems. Many can be fixed automatically with:
  scripts/format-check.sh --fix
(terrain-diffusion) 


$ uv run ruff check src tests
All checks passed!
(terrain-diffusion) 

@coveralls

coveralls commented Aug 21, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32797978609

Coverage increased (+1.0%) to 97.822%

Details

  • Coverage increased (+1.0%) from the base build.
  • Patch coverage: 162 of 162 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 505
Covered Lines: 494
Line Coverage: 97.82%
Coverage Strength: 0.98 hits per line

💛 - Coveralls

@KurbyDoo KurbyDoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall the structure looks good, just some things to clean up function boundaries and make testing easier

Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread tests/test_sampler.py
Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread tests/test_sampler.py Outdated
Comment thread src/terrain_diffusion/sampler.py
@KurbyDoo

Copy link
Copy Markdown
Member

I have a fix for the script error? Could you take a look #54

@yh-cyber

yh-cyber commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

I've implemented all changes!

@yh-cyber
yh-cyber requested a review from KurbyDoo August 23, 2026 15:08

@KurbyDoo KurbyDoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right now the windows are dependent on the region which is fine for now, later we will work to make them independent of the requested region and instead based on a global coordinate space. I'll make tickets for that later

Comment thread src/terrain_diffusion/sampler.py Outdated
Comment thread pyproject.toml Outdated
Comment thread .coverage Outdated
@yh-cyber
yh-cyber requested a review from KurbyDoo August 24, 2026 16:03

@KurbyDoo KurbyDoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for addressing my comments, looks good to merge after this

Comment thread tests/test_sampler.py Outdated
window_size = 3
step = 2

pipeline.generate.side_effect = lambda patch: patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you mock the function to return something more human readable. Right now this test just makes noise, its hard to tell how the output is affected, instead can you just make it return constant 1s?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread src/terrain_diffusion/sampler.py Outdated
The step is smaller than the window, which is what makes them overlap.
If window_size does not divide evenly, throws an assertion error."""

assert region_height % window_size == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, replace with step not window size

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

kk done

@yh-cyber

Copy link
Copy Markdown
Contributor Author

np, thnx. once you take a look and resolve the conversations, ill squash and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants