Skip to content

Commit 3d73f1f

Browse files
committed
most recent changes before fish
1 parent ac8909b commit 3d73f1f

63 files changed

Lines changed: 9139 additions & 500 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def sp_csr_to_pt(csr: scipy.sparse.csr_matrix, *, device: str) -> Tensor:
5555
# Bad.
5656
train_token_acts_fpath = train_inference_dpath / "token_acts.npz"
5757
if not train_token_acts_fpath.exists():
58-
msg = f"Train SAE activations missing: '{train_token_acts_fpath}'. Run inference.py."
58+
msg = (
59+
f"Train SAE activations missing: '{train_token_acts_fpath}'. Run inference.py."
60+
)
5961
logger.error(msg)
6062
raise FileNotFoundError(msg)
6163

contrib/freshwater_fish/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ ImageFolder structure: `output_dpath/{label}/{uuid}.jpg`
6262
Use with saev:
6363
```python
6464
from saev.data import ImgFolder
65+
6566
cfg = ImgFolder(root=pathlib.Path("data/freshwater-fish"))
6667
```
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
FINS Code,Species,Spc Grp,Feed Guild,TOL,IBI Grp,Riv Size,Brd Gld,Hab Pref,Family
2+
01001,Silver lamprey,0,P,,,L,N,B,Petromyzontidae
3+
01002,Northern brook lamprey,0,F,,,,N,P,Petromyzontidae
4+
01003,Ohio lamprey,0,P,,,,N,B,Petromyzontidae
5+
01004,Mountain brook lamprey,0,F,S,,,N,P,Petromyzontidae
6+
01005,Sea lamprey,0,P,,E,,N,B,Petromyzontidae
7+
01006,Least brook lamprey,0,,,,H,N,P,Petromyzontidae
8+
01007,American brook lamprey,0,F,R,,H,N,P,Petromyzontidae
9+
04001,Paddlefish,0,F,S,,L,S,B,Polyodontidae
10+
08001,Lake sturgeon,0,V,,,L,S,B,Acipenseridae
11+
08002,Shovelnose sturgeon,0,I,,,L,S,P,Acipenseridae
12+
10001,Alligator gar,L,P,,,L,M,P,Lepisosteidae
13+
10002,Shortnose gar,L,P,,,L,M,P,Lepisosteidae
14+
10003,Spotted gar,L,P,,,L,M,P,Lepisosteidae
15+
10004,Longnose gar,L,P,,,L,M,P,Lepisosteidae
16+
15001,Bowfin,0,P,,,,C,P,Amiidae
17+
18001,Goldeye,W,I,R,,L,M,B,Hiodontidae
18+
18002,Mooneye,W,I,R,,L,M,B,Hiodontidae
19+
20001,Skipjack herring,W,P,,,L,M,B,Clupeidae
20+
20002,Alewife,0,,,E,,M,P,Clupeidae
21+
20003,Gizzard shad,GS,O,,,,,,P,Clupeidae
22+
20004,Threadfin shad,GS,O,,,L,M,P,Clupeidae
23+
25001,Brown trout,SA,,,,,N,B,Salmonidae
24+
25002,Rainbow trout,SA,,,E,,N,B,Salmonidae
25+
25003,Brook trout,SA,,,,,N,B,Salmonidae
26+
25004,Lake trout,SA,P,,,,N,P,Salmonidae
27+
25005,Coho salmon,SA,P,,E,,N,P,Salmonidae
28+
25006,Chinook salmon,SA,P,,E,,N,P,Salmonidae
29+
25007,Cisco or Lake Herring,WF,I,,,M,M,P,Salmonidae
30+
25008,Lake whitefish,WF,I,,,M,M,P,Salmonidae
31+
30001,Rainbow smelt,,,,,,,P,Osmeridae
32+
34001,Central mudminnow,T,I,T,,C,C,P,Umbridae
33+
37001,Grass pickerel,P,P,P,,M,,P,Esocidae
34+
37002,Chain pickerel,P,P,,F,,M,P,Esocidae
35+
37003,Northern pike,P,P,,F,,M,P,Esocidae
36+
37004,Muskellunge,P,P,,F,,M,P,Esocidae
37+
37005,N. Pike x Muskellunge,P,P,,E,,,,Esocidae
38+
37006,Grass P. x Chain P.,P,P,,,,,Esocidae
39+
40001,Blue sucker,,I,,,L,S,,Catostomidae
40+
40002,Bigmouth buffalo,C,I,M,,L,M,,Catostomidae
41+
40003,Black buffalo,,I,,,L,M,,Catostomidae
42+
40004,Smallmouth buffalo,C,I,,C,L,M,P,Catostomidae
43+
40005,Quillback,C,O,,C,,M,P,Catostomidae
44+
40006,River carpsucker,C,O,,C,L,M,P,Catostomidae
45+
40007,Highfin carpsucker,C,O,,C,L,M,P,Catostomidae
46+
40008,Silver redhorse,R,I,M,R,,S,P,Catostomidae
47+
40009,Black redhorse,R,I,I,R,,S,,Catostomidae
48+
40010,Golden redhorse,R,I,M,R,,S,,Catostomidae
49+
40011,Shorthead redhorse,R,I,,R,,S,,Catostomidae
50+
40012,Greater redhorse,R,I,,R,,S,,Catostomidae
51+
40013,River redhorse,R,I,I,R,,S,,Catostomidae
52+
40014,Harelip sucker,R,S,,,S,,Catostomidae
53+
40015,Northern hog sucker,R,I,M,R,,S,,Catostomidae
54+
40016,White sucker,R,O,T,,,S,,Catostomidae
55+
40017,Longnose sucker,R,,I,R,,S,,Catostomidae
56+
40018,Spotted sucker,R,I,,R,,S,,Catostomidae
57+
40019,Lake chubsucker,R,I,,,,M,P,Catostomidae
58+
40020,Creek chubsucker,R,I,,P,M,P,Catostomidae
59+
43001,Common carp,G,O,T,,,M,P,Cyprinidae
60+
43002,Goldfish,G,O,T,,,M,P,Cyprinidae
61+
43003,Golden shiner,N,I,T,,,M,P,Cyprinidae
62+
43004,Hornyhead chub,M,I,I,,N,N,B,Cyprinidae
63+
43005,River chub,M,I,I,,,N,B,Cyprinidae
64+
43006,Silver chub,M,I,,,L,M,P,Cyprinidae
65+
43007,Bigeye chub,,I,I,,S,S,R,Cyprinidae
66+
43008,Streamline chub,M,I,,,,R,R,Cyprinidae
67+
43009,Gravel chub,M,I,I,,,S,R,Cyprinidae
68+
43010,Speckled chub,,I,,,,L,R,Cyprinidae
69+
43011,Blacknose dace,,G,,,,,R,Cyprinidae
70+
43012,Longnose dace,,I,,,,R,R,Cyprinidae
71+
43013,Creek chub,,G,,P,,,B,Cyprinidae
72+
43014,Tonguetied minnow,,I,,,,,P,Cyprinidae
73+
43015,Suckermouth minnow,,I,,,,R,R,Cyprinidae
74+
43016,Southern redbelly dace,,H,,,,H,B,Cyprinidae
75+
43017,Redside dace,,I,,,,,P,Cyprinidae
76+
43018,Rosyside dace,,I,,,,S,P,Cyprinidae
77+
43019,Pugnose minnow,,I,,,,,P,Cyprinidae
78+
43020,Emerald shiner,,I,,,,P,P,Cyprinidae
79+
43021,Silver shiner,N,I,,,,,P,Cyprinidae
80+
43022,Rosyface shiner,N,I,,,,,R,Cyprinidae
81+
43023,Redfin shiner,N,I,,,,,P,Cyprinidae
82+
43024,Rosefin shiner,N,I,,,,,P,Cyprinidae
83+
43025,Striped shiner,N,I,,,,,B,Cyprinidae
84+
43026,Common shiner,N,I,,,,,P,Cyprinidae
85+
43027,River shiner,N,I,,N,L,S,P,Cyprinidae
86+
43028,Spottail shiner,N,I,,N,L,M,P,Cyprinidae
87+
43029,Blackchin shiner,N,I,,N,,M,P,Cyprinidae
88+
43030,Bigeye shiner,N,I,,N,,S,B,Cyprinidae
89+
43031,Steelcolor shiner,N,I,,N,,M,P,Cyprinidae
90+
43032,Spotfin shiner,N,I,,,M,M,B,Cyprinidae
91+
43033,Bigmouth shiner,N,I,,N,,M,B,Cyprinidae
92+
43034,Sand shiner,N,I,,N,L,M,B,Cyprinidae
93+
43035,Mimic shiner,N,I,,N,,M,B,Cyprinidae
94+
43036,Ghost shiner,N,I,,N,,M,P,Cyprinidae
95+
43037,Blacknose shiner,N,I,N,,,M,P,Cyprinidae
96+
43038,Pugnose shiner,N,I,N,,,M,P,Cyprinidae
97+
43039,Silverjaw minnow,M,I,N,P,M,M,B,Cyprinidae
98+
43040,Mississippi silvery minnow,M,H,N,,,M,P,Cyprinidae
99+
43041,Bullhead minnow,N,O,N,,,C,P,Cyprinidae
100+
43042,Fathead minnow,M,O,T,N,P,C,B,Cyprinidae
101+
43043,Bluntnose minnow,M,O,T,N,P,C,B,Cyprinidae
102+
43044,Central stoneroller,M,H,,N,N,N,B,Cyprinidae
103+
43045,Common carp x Goldfish,G,O,T,G,,,,Cyprinidae
104+
43046,Popeye shiner,N,I,N,,,S,P,Cyprinidae
105+
43047,Grass carp,G,I,E,E,,M,B,Cyprinidae
106+
43048,Red shiner,N,I,,C,,N,P,Cyprinidae
107+
43049,Common x Rosyface Shiner,N,I,,,,,Cyprinidae
108+
43057,Striped shiner/Stoneroller,M,,,,,,Cyprinidae
109+
43058,Common shiner/Stoneroller,M,,,,,,Cyprinidae
110+
43059,Striped shiner/Horny chub,M,I,,,,,Cyprinidae
111+
43999,Hybrid Minnow,M,,,,,,Cyprinidae
112+
47001,Blue catfish,,C,,,C,C,P,Ictaluridae
113+
47002,Channel catfish,F,,F,,C,C,P,Ictaluridae
114+
47003,White catfish,F,I,,,C,C,P,Ictaluridae
115+
47004,Yellow bullhead,F,I,,,C,C,P,Ictaluridae
116+
47005,Brown bullhead,F,I,,,C,C,P,Ictaluridae
117+
47006,Black bullhead,F,I,,,C,C,P,Ictaluridae
118+
47007,Flathead catfish,F,P,F,L,C,C,B,Ictaluridae
119+
47008,Stonecat,0,I,I,,,C,R,Ictaluridae
120+
47009,Mountain madtom,0,I,,,,C,R,Ictaluridae
121+
47010,Northern madtom,0,I,R,,,,R,Ictaluridae
122+
47011,Scioto madtom,0,I,S,,,,,Ictaluridae
123+
47012,Brindled madtom,0,I,I,,,,,Ictaluridae
124+
47013,Tadpole madtom,0,I,,,,,,Ictaluridae
125+
50001,American eel,0,C,,,,,,Anguillidae
126+
54000,Western Banded killifish,T,I,S,,,,,Cyprinodontidae
127+
54001,Eastern Banded killifish,T,I,T,,,,,Cyprinodontidae
128+
54002,Blackstripe topminnow,T,I,,,,,,Cyprinodontidae
129+
57001,Mosquitofish,0,I,,,,,,Poeciliidae
130+
60001,Burbot,0,,,,,,,Gadidae
131+
63001,Trout-perch,0,I,,,,,,Percopsidae
132+
68001,Pirate perch,0,I,,,,,,Aphredoderidae
133+
70001,Brook silverside,0,I,M,,,,,Atherinidae
134+
74001,White bass,M,P,,,L,M,,Percichthyidae
135+
74002,Striped bass,W,P,,,L,M,,Percichthyidae
136+
74003,White perch,W,,,,E,,,Percichthyidae
137+
74004,White bass x White perch,W,,,,,,,Percichthyidae
138+
74005,Striped bass x White bass,W,,,,,,,Percichthyidae
139+
77001,White crappie,B,P,,,L,C,,Centrarchidae
140+
77002,Black crappie,B,I,,,L,C,,Centrarchidae
141+
77003,Rock bass,B,C,I,,,C,,Centrarchidae
142+
77004,Smallmouth bass,B,C,M,,,C,,Centrarchidae
143+
77005,Spotted bass,B,C,,,,,Centrarchidae
144+
77006,Largemouth bass,B,C,,,,,Centrarchidae
145+
77007,Warmouth,S,C,,,,,,P,Centrarchidae
146+
77008,Green sunfish,S,I,T,,P,P,P,Centrarchidae
147+
77009,Bluegill,S,I,P,,,,P,Centrarchidae
148+
77010,Orangespotted sunfish,S,I,,,,,,P,Centrarchidae
149+
77011,Longear sunfish,S,I,M,,,,,P,Centrarchidae
150+
77012,Redear sunfish,S,I,,,,,,P,Centrarchidae
151+
77013,Pumpkinseed,S,I,P,,,,P,Centrarchidae
152+
77014,Bluegill x Pumpkinseed,S,,,,,,Centrarchidae
153+
77015,Green x Bluegill,S,,,,,,Centrarchidae
154+
77016,Green x Pumpkinseed,S,,,,,,Centrarchidae
155+
77017,Longear x Bluegill,S,,,,,,Centrarchidae
156+
77018,Bluegill x Orangespotted,S,,,,,,Centrarchidae
157+
77019,Green x Orangespotted,S,,,,,,Centrarchidae
158+
77020,Pumpkinseed x Longear,S,,,,,,Centrarchidae
159+
77021,Green x Longear,S,,,,,,Centrarchidae
160+
77022,O'spotted x Pumpkinseed,S,,,,,,Centrarchidae
161+
77023,Longear x Orangespotted,S,,,,,,Centrarchidae
162+
77024,Green x Warmouth,S,,,,,,Centrarchidae
163+
77025,Warmouth x Pumpkinseed,S,,,,,,Centrarchidae
164+
77998,Green Sunfish Hybrid,S,,,,,,Centrarchidae
165+
77999,Hybrid Sunfish,S,,,,,,Centrarchidae
166+
80001,Sauger,V,P,,,,,,Percidae
167+
80002,Walleye,V,P,,,,,,Percidae
168+
80003,Yellow perch,V,,,,,,,Percidae
169+
80004,Dusky darter,D,M,,,,S,B,Percidae
170+
80005,Blackside darter,D,I,,D,,S,,Percidae
171+
80006,Longhead darter,D,I,I,D,L,S,R,Percidae
172+
80007,Slenderhead darter,D,I,I,D,,S,R,Percidae
173+
80008,River darter,D,I,,D,L,S,R,Percidae
174+
80009,Channel darter,D,I,,D,,S,P,Percidae
175+
80010,Gilt darter,D,I,,D,,,B,Percidae
176+
80011,Logperch,D,I,,D,,,B,Percidae
177+
80012,Crystal darter,D,I,,D,,,,Percidae
178+
80013,Eastern sand darter,D,I,,D,,,,Percidae
179+
80014,Johnny darter,D,I,,D,P,,,Percidae
180+
80015,Greenside darter,D,I,,D,,,,Percidae
181+
80016,Banded darter,D,I,,D,,,,Percidae
182+
80017,Variegate darter,D,I,,D,,,,Percidae
183+
80018,Spotted darter,D,I,,D,,,,Percidae
184+
80019,Bluebreast darter,D,I,,D,,,,Percidae
185+
80020,Tippecanoe darter,D,I,,D,,,,Percidae
186+
80021,Iowa darter,D,I,,D,,,,Percidae
187+
80022,Rainbow darter,D,I,,D,,,,Percidae
188+
80023,Orangethroat darter,D,I,,D,,,,Percidae
189+
80024,Fantail darter,D,I,,D,,,,Percidae
190+
80025,Least darter,D,I,,D,,,,Percidae
191+
80026,Sauger x Walleye,V,P,,E,,,,Percidae
192+
85001,Freshwater drum,F,,,L,,,Sciaenidae
193+
90001,Spoonhead sculpin,SC,,,,,,Cottidae
194+
90002,Mottled sculpin,SC,I,,H,,,Cottidae
195+
90003,Slimy sculpin,SC,,,,,,Cottidae
196+
90004,Deepwater sculpin,0,I,,H,,C,P,Gasterosteidae
197+
95001,Brook stickleback,0,I,I,,C,C,P,Gasterosteidae
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
family
2+
Amiidae
3+
Ictaluridae
4+
Gadidae
5+
Percichthyidae
6+
Catostomidae
7+
Aphredoderidae
8+
Atherinidae
9+
Hiodontidae
10+
Centrarchidae
11+
Cyprinidae
12+
Clupeidae
13+
Percidae
14+
Salmonidae
15+
Umbridae
16+
Anguillidae
17+
Cyprinodontidae
18+
Osmeridae
19+
Poeciliidae
20+
Petromyzontidae
21+
Gasterosteidae
22+
Percopsidae
23+
Polyodontidae
24+
Esocidae
25+
Acipenseridae
26+
Lepisosteidae

contrib/freshwater_fish/logbook.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 03/11/2026
2+
3+
Today I want to give everyone an introduction to the project, how I think it can work, and a possible six weeks of concrete steps.
4+
5+
This is just me thinking out loud.
6+
7+
What are the steps?
8+
9+
- Get relevant image data
10+
- EPA electrofishing (since 1987): potentially millions of fish images. Zach has EOB collaborator who might provide access. Should also check Tanya can help us get access; might add to ToL-200M.
11+
- Ohio freshwater fish: ~170 species. Zach will send metadata including river size and non-visual traits. We likely have images from BioClip 2 ToL-200M training data.
12+
- FishVista? The images came from "museum collections of fish images publicly available at GLIN [3–6, 8, 9, 16], IDigBio [7], and Morphbank [1] databases. We acquired these images along with their associated metadata including species names and licensing information from the FishAIR [2] repository. In total, we collected 56,481 images from GLIN, 41,505 from IDigBio, and 9,000 from MorphBank." But it seems they did a lot of post-processing.
13+
- Crop the images to the fish itself using moondream or perceptron
14+
- Record ViT activations.
15+
- Which ViT? What resolution? What layers? Probably DINOv3, but resolution is a key question.
16+
- Train an SAE sweep using the TopK + AuxK loss.
17+
- Pretty easy. SAE width is a question, as well as some optimizational stuff (dead latents, learning rate schedules, etc)
18+
- Pick out the pareto frontier
19+
- Again, pretty easy. Use a notebook.
20+
- Combine with metadata to find "interesting" traits
21+
- Metadata sources:
22+
- FishBase
23+
- Train a decision tree for classification
24+
- Train logistic regression (linear probing) and decision tree classifiers on DINOv3 activations directly (an upper bound on dichotomous key)
25+
- Train logistic regression (linear probing) and decision tree classifiers on SAE activations directly (another upper bound on dichotomous key)
26+
27+
Each of these have a bunch of substeps and specific decisions that need to be explored.
28+

0 commit comments

Comments
 (0)