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

Using prfanalyze-base to implement new analysis toolbox #70

Open
niklas-mueller opened this issue Jan 10, 2022 · 4 comments
Open

Using prfanalyze-base to implement new analysis toolbox #70

niklas-mueller opened this issue Jan 10, 2022 · 4 comments

Comments

@niklas-mueller
Copy link

Hello! Your prf validation framework is a great step towards being able to compare multiple toolboxes designed for the same or similar purposes and enables us to validate the underlying implementations. For exactly this purpose I am trying to integrate our own prf analysis toolbox into your validation framework and I am running into a couple of problems. The following steps explain the present scenario:

  1. A synthetic dataset has been created with the prfsynth dockerimage, using the default settings.
  2. I duplicated the structure of the other prfanalyze toolboxes in order to create my own integration into the validation framework.
  3. I adjusted the dockerfile to include the necessary scripts and to create a conda environment in which python3 is installed in order to be able to run our toolbox. This was initially also a problem because python2 is installed in the base image. However, we managed to circumvent this.
  4. I implemented the calling of our analysis script the same way as already implemented for the other toolboxes (i.e. using the solve.sh which in turn is calling our analysis python script) and validated that the script is running and doing what it is supposed to do (mainly, going from a BIDS data structure to a BIDS data structure creating a range of output files)
  5. By downloading the actual code base for the prfmodel and using the following command I managed to start the analysis. However, this does not achieve the direct implementation into the validation framework:
    ./PRFmodel/gear/prfanalyze/run_prfanalyze.sh prfpy $basedir prfanalyze-prfpy/default_config.json

Given the above scenario the following problems arise:

  1. Using the proposed call from the wiki to create the default config file
    docker run --rm -it \ -v $basedir/empty:/flywheel/v0/input:ro \ -v $basedir:/flywheel/v0/output \ garikoitz/prfanalyze-prfpy:latest
    the following output is produced:
    [garikoitz/prfanalyze] No config file found. Writing default JSON file and exiting.
    cp: cannot create regular file '/flywheel/v0/input/config.json': Read-only file system
    That is, the config file that is indeed contained in the build dockerimage (can be verified by starting the image in debug mode) is trying to be copied into the mounted input directory (which is read-only) which however should be copied into the output directory. As for the other toolboxes this problem does not arise. By looking at the dockerfile for the other toolboxes there are no extra steps needed in order to make this process working. Can you verify that this is indeed the case?

  2. From the above arises the next problem. While trying to understand the scripts that are responsible for the setup for the analysis (that are the run.py and run.sh script from the prfanalyze-base image) I wanted to debug this by changing the code. However, when trying to build the prfanalyze-base image on my machine in order to be able to run it with local changes I am running into version conflicts (build_output.txt).

  3. Lastly and unfortunately, I was not able to find a comprehensive documentation about how the integration of new toolboxes into the validation framework is supposed to work. As the possibility to do this has been stated in your paper showing the usefulness and results of this framework it would be a great help to have some guidance in how to do this.

The repository for our code base can be found here.

Thank you in advance and I am very much looking forward to here back from you.

@garikoitz
Copy link
Contributor

garikoitz commented Jan 12, 2022 via email

@niklas-mueller
Copy link
Author

Thanks for the quick reply! The upgrade sounds good, looking forward to that.

Regarding the base container. I would say that if your implementation is
Python based, you could duplicate the popeye gear and substitute your code there, and keep the rest.
https://github.com/vistalab/PRFmodel/tree/master/gear/prfanalyze/popeye

This is exactly what I did and why I was expecting the base functionality to work. Then however, I run into the described problems when mounting the directories.

@garikoitz
Copy link
Contributor

garikoitz commented Jan 12, 2022 via email

@garikoitz
Copy link
Contributor

garikoitz commented Feb 20, 2022 via email

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

No branches or pull requests

2 participants