castorini / rank_llm

Repository for prompt-decoding using LLMs (GPT3.5, GPT4, Vicuna, and Zephyr)
http://rankllm.ai
Apache License 2.0
277 stars 36 forks source link

P2-Make all folders configurable parameters with current names as their default value. #41

Closed sahel-sh closed 5 months ago

sahel-sh commented 6 months ago

retrieve_results, rerank_results, prompts_and_responses, token_counts are the four folder names that are hardcoded in the code, Ideally, these should be configurable input parameters with default values

sahel-sh commented 5 months ago

Now that the ResultsWriter takes filenames as input, this is a p2. The only place where read and write happens with default hardcoded values are in reranker.write_rerank_results which is called from retrieve_And_rerank which is not the main form of using our API.

dannychn11 commented 5 months ago

@sahel-sh Is this issue still needed, I see that in reranker.write_rerank_results the writes are already replaced with the ResultsWriter class.

yilinjz commented 5 months ago

@sahel-sh Interested in this (if still open).

sahel-sh commented 5 months ago

@sahel-sh Is this issue still needed, I see that in reranker.write_rerank_results the writes are already replaced with the ResultsWriter class.

You are right, as I mentioned in comment #2, the only part that folder names are hard coded is inside the write rerank results. In this function they are calculated based on some parameters that the user provides, but it doesn't have to be this way. This function can optional three file names/path to store the results

sahel-sh commented 5 months ago

@sahel-sh Interested in this (if still open).

It is yours

yilinjz commented 5 months ago

@sahel-sh Made a PR here https://github.com/castorini/rank_llm/pull/82

sahel-sh commented 5 months ago

Thank you @yilinjz for working on this!