demichie / elicipy

Expert. elicitation Python code
GNU General Public License v2.0
2 stars 4 forks source link

Following the ReadMe and running in to app deployment issues on Streamlit #3

Closed peterjamesnugent closed 2 months ago

peterjamesnugent commented 2 months ago

@demichie / @aletadini a colleague and I have been trying to setup an eclipy app (initially just to test it and then eventually for a questionnaire) but we are running in to some trouble.

I have setup a branch with my commits here: https://github.com/peterjamesnugent/elicipy/tree/configuration-test

Initially we tried to use the settings in the testWebform folder as a starting point before trying to use the premade Cotopaxi folder.

Neither yielded any results when creating the app on Streamlit following the instruction in the ReadMe.

A few things I was unclear of:

  1. My impression was that the results would be stored in a seperate repo, is that specified with a link or just a name?
  2. Step 5 to edit EliciationCase.py is that just editing the folder name on L1?

When using Python 3.9 we would get a blank screen when deploying the app, but for 3.8 and 3.10 we would get errors that something had gone wrong. It just feels like we are missing something blatantly obvious 😆

image

demichie commented 2 months ago

Hello, I edited the README file trying to make more clear (I hope...) how to proceed. As regards you questions:

  1. Yes, you need a separate private repository to store the answers. In the new step 1 of the README you can find how to do that.
  2. Yes, you only have to edit the folder name.

I just tried to follow all the steps, as they are written now, and I successfully got the webform from streamlit by using Python 3.8.

Before trying to set up a new questionnaire, my suggestion is to just have the Cotopaxi example running on Streamlit. When it runs, then you can modify the dictionaries and the csv file with the questions to set up your form.

Kind regards, Mattia

peterjamesnugent commented 2 months ago

hi @demichie,

Thanks for replying - a few things I think still need claritifcation in

https://github.com/demichie/elicipy?tab=readme-ov-file#github-streamlit-repository:

Point 3

and the RepositoryData (with the new github repository for the answers).

Does this need to be a link, the repo name? I have tried both and it seems like the link gets further.

Repo name:

File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/mount/src/elicipy-test/streamlit_app.py", line 885, in main() File "/mount/src/elicipy-test/streamlit_app.py", line 417, in main from createWebformDict import quest_type File "/mount/src/elicipy-test/ELICITATIONS/Cotopaxi/createWebformDict.py", line 4, in datarepo = eclipy-repo-data

Repo link:

File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/mount/src/elicipy-test/streamlit_app.py", line 885, in main() File "/mount/src/elicipy-test/streamlit_app.py", line 417, in main from createWebformDict import quest_type

Point 4

Set in the input file createWebformDict.py the quest_type variable to "seed" of "target".

How does this work with questionaires that have both seed and target questions?

See error message above. In the Cotopaxi example it is set to 'seed' and I leave this unchanged but get the error above (when using the repo link).

demichie commented 2 months ago

RepositoryData should be the name of the repository you created for the answers, so the line should be something like that:

RepositoryData = 'daterepo_name'

The webform can only show the seed or the target questions. Usually the seeds are collected first, and one the collection of answers to the seed question is completed, you can edit the file and change quest_type to "target". The seed and target answers will be saved in two different folders in your data repository.

peterjamesnugent commented 2 months ago

Thanks, @demichie got it working!