Support passing arbitrary flags to `run_all_experiments.py` via `request_pr_exp.py`.
Currently there is very little control over flags passed to PR experiments: https://github.com/google/oss-fuzz-gen/blob/3dd239a104eadef1868f94c709a3dbf4375fc1db/ci/k8s/pr-exp.yaml#L34
We should ideally support piping arbitrary flags via request_pr_exp.py.
e.g.
request_pr_exp.py -p 123 -n NAME -- --model=foo --context
Another issue about docker_run.sh is that it assumes the order of command line args.
This is a good opportunity to upgrade it to a Python script to allow more flexible args.
Hi @DonggeLiu
I’d like to start working on converting docker_run.sh into a Python script (docker_run.py) to improve flexibility in argument handling. My plan is to:
- Replace
docker_run.shwithdocker_run.py, using named arguments (--flag value) instead of fixed positional arguments. - Update
pr-exp.yamlto calldocker_run.pyinstead ofdocker_run.sh. - Modify
docker_run.pyto dynamically parse command line arguments and construct the command to executerun_all_experiments.py. - Support passing additional flags so they are correctly forwarded to
run_all_experiments.py.
Would this approach align with what you had in mind? Also, do you have any specific requirements or constraints I should be aware of before starting?
Looking forward to your guidance!
Thanks!
Thanks @KKSurendran06! That's very kind of you.
Replacedocker_run.sh with docker_run.py, using named arguments (--flag value) instead of fixed positional arguments.
Yep, this is a good starting point.
Update pr-exp.yaml to call docker_run.py instead of docker_run.sh. Modify docker_run.py to dynamically parse command line arguments and construct the command to execute run_all_experiments.py. Support passing additional flags so they are correctly forwarded to run_all_experiments.py.
Yes, and since the main goal is to allow request_pr_exp.py to pass arbitrary flags to run_all_experiments.py, we will need to modify request_pr_exp.py too.
Hey @KKSurendran06, I am already working on this, as assigned here.
@Snehil-Shah
I see what happened now. I didn’t realize this was a sub-issue of #830, and since this one remained unclaimed, I went ahead and worked on it. Now that I see you were assigned the parent issue but not this one specifically, I understand the mix-up.
That said, I’ve already completed the changes, and they’re ready to be merged. But since neither of us expected this mix-up, I’m happy to step back if you’d prefer to continue solo. Alternatively, if you’d like to collaborate, I’d be happy to work together on this.
Thanks!
Hey @KKSurendran06, as you have already completed the changes, feel free to make a PR. there's no point in doing double work again :)