feagi / brain-visualizer

0 stars 1 forks source link

Region contents are not loaded properly in CB #253

Closed m-nadji-tehrani closed 4 days ago

m-nadji-tehrani commented 2 weeks ago

Load attached genome here: response_1718512235212.json . Region r1 contains two cortical areas of mbac and mlef. It also contains a subregion within called r2 that includes mfor and mrig. Dispite that CB shows the following

image
Amir-Rasteg commented 2 weeks ago

@m-nadji-tehrani BV is actually reporting this genome as corrupt, as its spamming this error in the log

E 0:00:02:0564 BrainRegionsCache.gd:40 @ FEAGI_load_all_regions_and_establish_relations_and_calculate_area_region_mapping(): CORE CACHE: Cortical Area ___pwr previously reported in region root is now reported in region root! Something is wrong with the genome! Keeping the original region! <C++ Source> core/variant/variant_utility.cpp:1091 @ push_error()

BrainRegionsCache.gd:40 @ FEAGI_load_all_regions_and_establish_relations_and_calculate_area_region_mapping() FEAGILocalCache.gd:38 @ replace_whole_genome() FEAGIRequests.gd:46 @ reload_genome() APIRequestWorker.gd:119 @ _call_complete() Can I ask how you made this genome?
Amir-Rasteg commented 2 weeks ago

seems that in the /v1/region/regions_members endpoint, you are listing cortical areas multiple times in multiple regions, causing BV not to understand where anything goes

{ "root": { "title": "Genome's root brain region", "description": null, "parent_region_id": null, "coordinate_2d": [ 0, 0 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "___pwr", "o__mot", "iv00_C", "iv00BL", "iv00BM", "iv00BR", "iv00ML", "iv00MR", "iv00TL", "iv00TR", "iv00TM", "CRSMot", "CIHMot", "CKQM2_", "CKYM2_", "CO4M3_", "CJWM3_", "CTGM4_", "CLWM4_", "___pwr", "o__mot", "m__lef", "m__rig", "m__for", "m__bac", "iv00_C", "iv00BL", "iv00BM", "iv00BR", "iv00ML", "iv00MR", "iv00TL", "iv00TR", "iv00TM", "CRSMot", "CIHMot", "CKQM2_", "CKYM2_", "CO4M3_", "CJWM3_", "CTGM4_", "CLWM4_" ], "regions": [ "240616002827497866_A0SBD1_R" ], "inputs": [], "outputs": [] }, "240616002827497866_A0SBD1_R": { "title": "r1", "description": null, "parent_region_id": "root", "coordinate_2d": [ 734, -120 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "m__bac", "m__lef" ], "regions": [ "240616002852751140_KB3NMZ_R" ], "inputs": {}, "outputs": {}, "suggested_afferents": [], "suggested_efferents": [], "signature": "" }, "240616002852751140_KB3NMZ_R": { "title": "r2", "description": null, "parent_region_id": "240616002827497866_A0SBD1_R", "coordinate_2d": [ 895, 17 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "m__for", "m__rig" ], "regions": [], "inputs": {}, "outputs": {}, "suggested_afferents": [], "suggested_efferents": [], "signature": "" } }

(if you copy and paste the line above to a json viewer, you will see m__left in multiple regions. there are other areas that do this too)

BTW, arent IOPUs and CORE type areas not allowed in regions?

Amir-Rasteg commented 1 week ago

I can replicate it in API, suggesting this to be a FEAGI issue.

Repo:

{ "root": { "title": "Genome's root brain region", "parent_region_id": null, "coordinate_2d": [ 0, 0 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "___pwr", "o__mot", "m__for", "m__bac", "iv00_C", "iv00BL", "iv00BM", "iv00BR", "iv00ML", "iv00MR", "iv00TL", "iv00TR", "iv00TM", "CRSMot", "CIHMot", "CKQM2_", "CKYM2_", "CO4M3_", "CJWM3_", "CTGM4_", "CLWM4_", "CLWtur" ], "regions": [ "240617163033469499_2TSU7W_R" ], "inputs": [], "outputs": [] }, "240617163033469499_2TSU7W_R": { "title": "hold things", "description": null, "parent_region_id": "root", "coordinate_2d": [ 891, 386 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "m__rig", "m__lef" ], "regions": [], "inputs": {}, "outputs": {}, "suggested_afferents": [], "suggested_efferents": [], "signature": "" } }

{ "root": { "title": "Genome's root brain region", "parent_region_id": null, "coordinate_2d": [ 0, 0 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "___pwr", "o__mot", "m__for", "m__bac", "iv00_C", "iv00BL", "iv00BM", "iv00BR", "iv00ML", "iv00MR", "iv00TL", "iv00TR", "iv00TM", "CRSMot", "CIHMot", "CKQM2_", "CKYM2_", "CO4M3_", "CJWM3_", "CTGM4_", "CLWM4_", "CLWtur", "___pwr", "o__mot", "m__lef", "m__rig", "m__for", "m__bac", "iv00_C", "iv00BL", "iv00BM", "iv00BR", "iv00ML", "iv00MR", "iv00TL", "iv00TR", "iv00TM", "CRSMot", "CIHMot", "CKQM2_", "CKYM2_", "CO4M3_", "CJWM3_", "CTGM4_", "CLWM4_", "CLWtur" ], "regions": [ "240617163033469499_2TSU7W_R" ], "inputs": [], "outputs": [] }, "240617163033469499_2TSU7W_R": { "title": "hold things", "description": null, "parent_region_id": "root", "coordinate_2d": [ 891, 386 ], "coordinate_3d": [ 0, 0, 0 ], "areas": [ "m__rig", "m__lef" ], "regions": [], "inputs": {}, "outputs": {}, "suggested_afferents": [], "suggested_efferents": [], "signature": "" } }

We can see here there are duplicates both within the root region and the created one This is a FEAGI side issue @m-nadji-tehrani

Amir-Rasteg commented 4 days ago

seems to be resolved