Skip to content

Some basic UCE prompts#2

Open
wlg1 wants to merge 9 commits into
narmeen/debiasingfrom
michael/baselines
Open

Some basic UCE prompts#2
wlg1 wants to merge 9 commits into
narmeen/debiasingfrom
michael/baselines

Conversation

@wlg1

@wlg1 wlg1 commented Oct 16, 2025

Copy link
Copy Markdown
Collaborator

Simple UCE prompts that the paper used for generating race and profession images. can reuse for experiments comparing to baselines

LukeSamkharadze added a commit that referenced this pull request May 28, 2026
Two bugs that compound and break the Steering page's "Shift toward
demographic" preset (8 inline pairs + CAA + sdxl_turbo):

1. ActivationsDataloader.renew_buffer raised StopIteration *before*
   re-materialising the carry-over rows into self.buffer, so the
   iterate() tail-yield fallback (`if self.buffer is not None: yield
   self.buffer[self.pointer:]`) silently dropped any under-sized tail.
   A 13-row train split against batch_size=16 produced zero batches.

2. With the tail now exposed, run_steer.collect_from_loader hit an
   IndexError. The act loader (flatten=True) treats each tar entry's
   (seq, dim) activation as `seq` rows; the label loader (flatten=False)
   treats one entry as one row. PairedLoader zips them per-batch, so an
   act batch of size 16 paired with a label batch of size 13. Cap
   iteration to the shorter side — same semantics as the pre-existing
   zip-truncation behaviour for full-batch runs.

Adds two test layers so this regression chain doesn't return:

- tests/unit/test_buffer.py — 4 regression tests for ActivationsDataloader
  and PairedLoader covering the under-sized tail, exact batch boundary,
  and the common multi-batch case.
- tests/integration/test_e2e_cli.py — slow-marked e2e tests that spawn
  the actual t2i-steer / t2i-localise / t2i-stitch CLIs (same code path
  as the Streamlit pages) at minimum scale. Caught bug #2 above. Skip
  on non-MPS so they don't run on CI without an accelerator.
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.

1 participant