computationalmystic / RJI-group24

0 stars 2 forks source link

Grader Not Working #4

Closed bmsc7d closed 5 years ago

bmsc7d commented 5 years ago

One issue that we are having is that we are having problems getting the photo grader to work on our aws server. We will resolve this issue by going to office hours to get some help on how to get our photo grader to work. Specifically, how to create a shell script and ensure the right version of Python is being called through the idelo image-quality-assessment. We currently have a placeholder for the image quality assessment and understand how it should be called through the php file, and the shell script is written but needs to have the correct file path.

sophienedelco commented 5 years ago

After going to office hours, we ensured that the right version of Python is being called through the idealo image-quality-assesment. We created shell script and moved it into the correct folder so that it can be called from the php file. However, when it is called, the score does not show up for the photo, and the grade is not working, so we think that the file path in the shell script may be off.

sophienedelco commented 5 years ago

Met with group 1 to try to troubleshoot why our shell script may be off. They said that instead of passing in the $title variable, we should be passing in a $1 because that's how bash works. They also said we may want to download dos2unix in order for our file to run correctly and produce output. I first tried changing the variable in our shell script, and since that didn't solve our issue, and we're still only getting a 0 for the returned graded value, I'm working on downloading dos2unix and figuring out how to use that.

sophienedelco commented 5 years ago

After talking to Goggins, we updated the shell script to include = signs where they weren't before. The shell script works just fine and returns a graded value when run in terminal with an exact image path. However, when called from the php file with $1 or $title as the parameter being passed, it still doesn't work. I even tried replacing $1 or $title with $IMG_7881 or just IMG_7881, and neither worked. So we're currently not understanding what our issue might be. I am wondering if using the dos2unix would be helpful, but am not sure how to run this on the shell script file.

sophienedelco commented 5 years ago

Went to office hours on Saturday morning and troubleshooted this issue with Matt Carroll from another RJI group. We found that the shell script we want to call from our php file was not located where we said it was in our directory. We figured this out through just trying to run the line being called in the php file along with an exact image path (instead of running the contents of the shell script itself). So, we added ../.. to the beginning of the shell script file in the bash call. I thought this would've solved the problem, but it didn't quite yet, and the shell script is still not being called/grading the photos.

sophienedelco commented 5 years ago

In order to finally resolve this issue and get the grader to be correctly called from the shell script, I went to office hours a couple times to determine that the permissions on my ec2 instance needed to be modified, and a new directory needed to be created. Called photo app and accessible from the home directory, this directory gives the shell script access to the image quality assessment files.