Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with visualization attachments (from cortex to mindLAMP) in mindLAMP portal tab #688

Open
Tuna9129 opened this issue Aug 30, 2022 · 21 comments
Assignees
Labels
bug Something isn't working cortex LAMP-cortex, LAMP-ide, LAMP-py, and LAMP-r frontend LAMP-dashboard, LAMP-activities, and LAMP-js on hold Issue will not be worked on yet or is roadblocked priority MEDIUM Medium priority item

Comments

@Tuna9129
Copy link
Contributor

Describe the bug
When I go to the portal tab on mindLAMP after attaching the visualizations via cortex (and enabling them on the Portal by choosing the data I want to see on the dashboard), I will see the visualizations I want. However, I also see something weird that should not be there. It happens on both my iPhone and my laptop. My coworker also noted the same issue on their devices as well.

To Reproduce
Steps to reproduce the behavior:

  1. Go to cortex and attach a participant level visualization
  2. Go to mindLAMP Portal tab
  3. Click on + sign (for Cortex visualizations) and select the relevant data (participant lvl visualization that was attached via cortex)
  4. Scroll and see error

Expected behavior
When doing the above, it should show only the participant level visualizations and not the weird "lamp.dashboard.experimental...." thing you will see in the screenshot below.

Screenshots
image
FF6C7DFE-3DC8-4EDD-8F17-93C3FE519293_1_102_o

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Browser: Chrome
  • Version (macOS): 12.5

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: 15.6
@Tuna9129 Tuna9129 added bug Something isn't working priority MEDIUM Medium priority item labels Aug 30, 2022
@lukeoftheshire
Copy link
Contributor

Can you let me know the python code that you ran to get this in cortex?

Also, can you run list_attachments and also get the stored value of 'lamp.selectedExperimental' on the participant in question? This looks like LAMP is trying to find an attachment that doesn't exist.

Basically, the way the participant portal page works is the tag has to start with 'lamp.dashboard.experimental.NAME' and then the tag 'lamp.selectedExperimental' will be an array of strings. If one of those strings is "NAME" (NOTE: NOT 'lamp.dashboard.experimental.NAME' [I think]) then LAMP will fetch 'lamp.dashboard.experimental.NAME'. So I'm guessing that 'lamp.dashboard.experimental.NAME' has been erroneously put into the 'lamp.selectedExperimental' array and is causing this issue, because LAMP is trying to fetch something like 'lamp.dashboard.experimental.lamp.dashboard.experimental.NAME'.

@Tuna9129
Copy link
Contributor Author

Sure! I've put it in a screenshot.

So I think you're right. When the stored value of 'lamp.selectedExperimental' is returned, it returns BOTH 'lamp.dashboard.experimental.NAME' AND just 'NAME' for every single visualization.

image

@lukeoftheshire
Copy link
Contributor

Yup - so the "bug" here is most likely in the code that generated/attached these tags. If you want to post it I can take a look (up to you!). If this was generated only with cortex functions (as opposed to someone writing a block of code) it should be looked into so we don't have buggy methods in cortex.

Otherwise, a solution to this is probably not to show tags that don't load on the portal page - which we maybe should do anyway.

@Tuna9129
Copy link
Contributor Author

Tuna9129 commented Aug 31, 2022

Thanks for the response!

This was generated only with the cortex function (cortex.visualizations.participant.passive(id))
A coworker was also having a similar issue so I think it is an issue with the relevant methods in cortex.

Regarding your last sentence, should I reassign the issue to orangeloops?

@avaidyam
Copy link
Member

avaidyam commented Sep 7, 2022

@Tuna9129 I've reassigned the issue for you. Please be sure to add the right labels and project to each GitHub issue when creating them. //cc @ertjlane @carlan1 @lugray1

@Tuna9129
Copy link
Contributor Author

Tuna9129 commented Sep 7, 2022

ok, will do, thank you!

@mcurbelo-orangeloops
Copy link
Contributor

Hey @avaidyam and @Tuna9129 , I think this was mistakenly assigned to me ?

@avaidyam avaidyam added frontend LAMP-dashboard, LAMP-activities, and LAMP-js cortex LAMP-cortex, LAMP-ide, LAMP-py, and LAMP-r labels Sep 8, 2022
@mcurbelo-orangeloops
Copy link
Contributor

@lukeoftheshire @avaidyam I just created this PR which I believe will fix this problem. as mentioned in the PR though, I have no way to verify because I don't have access to any data sets that will replicate this issue.

@avaidyam
Copy link
Member

avaidyam commented Oct 5, 2022

@Tuna9129 I've merged the PR so please check the staging Dashboard. Also, @lukeoftheshire @Tuna9129 the PR removes static PNG/image support - is that okay?

@mcurbelo-orangeloops
Copy link
Contributor

@avaidyam I can re add the support on a different way, the reason I went with outright removal is because it would always show an empty image. The image tag was on the else branch of this statement visualizations["lamp.dashboard.experimental." + x] !== null where the visualization result was always nil and being used as the src for the image, therefore always showing empty.

@avaidyam
Copy link
Member

avaidyam commented Oct 5, 2022

Ah, that's a great catch! Thanks, could you add the functionality back in a more robust way? Vega graphs are our goal but we'd like image fallback just in case.

@mcurbelo-orangeloops
Copy link
Contributor

Any ideas for what the condition should be for displaying either ? Not too familiar with the data being shown so any help is appreciated. Or is it a matter of "try one, if it doesn't work, try the other one"?

@avaidyam
Copy link
Member

avaidyam commented Oct 6, 2022

I suppose it's a fallback only in case the first one doesn't work.

@ertjlane
Copy link
Contributor

ertjlane commented Nov 2, 2022

Looking in the staging dashboard it appears that visualizations are still not showing up. Should we expect this to be the case?
Screenshot 2022-10-25 at 16 43 00

@ertjlane
Copy link
Contributor

ertjlane commented Nov 9, 2022

@SethgunterOL

@falmeida-orangeloops
Copy link

@ertjlane Even though I checked the existing participants in the staging dashboard, I haven't been able to reproduce this issue. Here's an example of what the Cortex section looks like for me:
Screenshot 2022-11-10 at 19-13-06 User U1610343133
I could not find a participant with a Cortex section that looks like your screenshot. Could you give more instructions/data so as to reproduce this?

@Tuna9129
Copy link
Contributor Author

image

Hello! I went and created a new test participant today and attached some graphs using cortex.
cortex.visualizations.participant.passive('U7827153000', attach_graphs=True)

I then went to the staging dashboard and got the above screenshot. I'm looking into cortex right now because we are fairly certain that there's a bug within cortex causing this.

However, in the meantime, we want to do this: "a solution to this is probably not to show tags that don't load on the portal page - which we maybe should do anyway."

@falmeida-orangeloops
Copy link

@Tuna9129 thank you very much! Now I see the exact same as your screenshot. I'll look into that.

@falmeida-orangeloops
Copy link

This should be fixed by BIDMCDigitalPsychiatry/LAMP-dashboard#681. I tested this fix with the data that was provided above, as well as with some of the other previously existing data, and it is working for all of them now.

For screenshots showing the change, you can check that pull request's comments.
@ertjlane let me know if you happen to run into this issue again!

@Tuna9129
Copy link
Contributor Author

Tuna9129 commented Dec 9, 2022

Hello! Thank you, it is better but now there is another small issue. Basically, the visualizations no longer match up with what is selected to be displayed. Now, when I go to select a visualisation for display after attaching the graphs through the cortex method, the visualizations are doubled! I don't think I can explain it as well, so I have attached a video depicting the bug.

Screen.Recording.2022-12-09.at.13.43.06.mov

However, we have decided to put this one on hold because we are thinking of having the portal page changed quite a bit anyways, so we have decided to wait.

@Tuna9129 Tuna9129 added the on hold Issue will not be worked on yet or is roadblocked label Dec 9, 2022
@falmeida-orangeloops
Copy link

falmeida-orangeloops commented Dec 15, 2022

Ok I see, let me check again when I finish with the high priority issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cortex LAMP-cortex, LAMP-ide, LAMP-py, and LAMP-r frontend LAMP-dashboard, LAMP-activities, and LAMP-js on hold Issue will not be worked on yet or is roadblocked priority MEDIUM Medium priority item
Projects
Status: No status
Development

No branches or pull requests

7 participants