-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Description
The current inference script (inference/llava1.5.py) uses a fixed JSON file path for the --data argument. However, this argument should ideally support dynamic input lists, such as a collection of paths that include both normal sensor inputs and special cases like rain, fog, or snow conditions.
Current Behavior
The script is hard-coded to use a single fixed JSON file path for --data:
--data data/DriveBench20K/drivebench-test-final3.jsonThis limits flexibility, especially when handling multiple input scenarios (e.g., normal conditions vs. adverse weather conditions).
Expected Behavior
The --data argument should accept a list of paths or a flexible input format that allows specifying multiple datasets, such as:
--data "data/normal.json,data/rain.json,data/snow.json"Here is my possible improments but I can not ensure its correction:
Suggested Improvements
- Modify the
--dataArgument: Allow it to accept a list of paths or a JSON file containing multiple dataset paths. - Update the Script Logic: Ensure the script can iterate over multiple datasets dynamically.
- Support Special Cases: Explicitly handle different input scenarios (e.g., rain, fog, snow) by iterating over the provided paths.
Example Implementation
Here’s a potential modification to the script:
# Loop over the arrays and run the commands.
for i in "${!outputs[@]}"; do
python inference/llava1.5.py \
--model /high_perf_store/mlinfra-vepfs/wangjinghui/drive-bench/LLM_checkpoint/llava_1.5_7b_hf \
--data "${data_paths[i]}" \ # Accepts a list of paths
--output "res/llava-1.5-7b/${outputs[i]}" \
--system_prompt prompt.txt \
--num_processes "${GPU}" \
--max_model_len 2048 \
--corruption "${corruptions[i]}"
doneAdditional Notes
This change would make the inference script more flexible and better suited for handling diverse input scenarios??