I want to export the results of a Prodigy tagging session through the command db-out. Prodigy is installed in a Google Compute Engine VM, however, I am not the owner of it and for that reason, what I am attempting, looks like this:
# Assume `test1` exists
DB_NAME="test1"
# `super_user` is Prodigy owner's home directory.
sudo runuser -l super_user -c 'python3 -m prodigy db-out "$DB_NAME" > ./"$DB_NAME".jsonl'
The previous commands should generate a test1.jsonl
file, which should be found in the super_user
home directory; however, no test1.jsonl
is generated. BTW, when those lines are run, no warning or error is displayed.
Nevertheless, when I directly run the following command:
sudo runuser -l super_user -c 'python3 -m prodigy db-out test1 > ./test1.jsonl'
test1.jsonl
file is correctly generated, as expected and explained before. Why?
Additional notes / updates:
After addressing my attention to this post (which was kindly suggested by Gordon Davidson, and whose revision is highly suggested), I managed to solve my original issue. The corrected code looks like follows:
Just to make changes clear, they are:
Afterwards, the script works as it is supposed to be. If I understand this post correctly, there could be some other valid answers; however this one works for now.
Thank you.