Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yunx-z committed Dec 29, 2024
1 parent 5adf026 commit 9b61e15
Show file tree
Hide file tree
Showing 22 changed files with 194 additions and 1,011 deletions.
25 changes: 10 additions & 15 deletions MLAgentBench/LLM.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,15 @@
# print(e)
# print("Could not load anthropic API key claude_api_key.txt.")

try:
import openai
# setup OpenAI API key
openai_api_key = os.getenv('MY_OPENAI_API_KEY')
openai_api_base = os.getenv('MY_AZURE_OPENAI_ENDPOINT')
openai_client = openai.AzureOpenAI(
azure_endpoint=openai_api_base,
api_key=openai_api_key,
api_version="2024-10-01-preview",
)
except Exception as e:
pass
# print(e)
# print("Could not load OpenAI API key openai_api_key.txt.")
import openai
# setup OpenAI API key
openai_api_key = os.getenv('MY_OPENAI_API_KEY')
openai_api_base = os.getenv('MY_AZURE_OPENAI_ENDPOINT')
openai_client = openai.AzureOpenAI(
azure_endpoint=openai_api_base,
api_key=openai_api_key,
api_version="2024-10-01-preview",
)

try:
import vertexai
Expand Down Expand Up @@ -300,7 +295,7 @@ def complete_text_openai(prompt, stop_sequences=[], model="gpt-4o-mini", max_tok
raw_request = {
"model": model,
"temperature": 1,
"max_completion_tokens": 32000,
"max_completion_tokens": 64000 if model.lower() == "o1-mini" else 32000,
**kwargs
}
else:
Expand Down
2 changes: 2 additions & 0 deletions MLAgentBench/benchmarks/base_competition/env/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
parser.add_argument("-d", "--dataset_filepath", type=str, default="data/dev_data.jsonl")
args = parser.parse_args()

os.makedirs("output", exist_ok=True) # `save_evals` assume that `output/` folder exists

loaded_methods = all_method_handlers()
curr_method = loaded_methods[args.method](args.method)
start_time = time.time()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You have been provided with a starter kit that includes an end-to-end submission

## Test Method

Simply run `python main.py -m {method_name}`. For example, to test the baseline method, execute `python main.py -m my_method`. [Describe what will happen for the evaluation pipeline]
Simply run `python main.py -m {method_name}`. For example, to test the baseline method, execute `python main.py -m my_method`. [Describe what will happen for the evaluation pipeline in the **development** phase, not **test** phase.]

## Competition Rules

Expand Down
31 changes: 0 additions & 31 deletions MLAgentBench/benchmarks/llm-merging/env/llm_merging/constants.py

This file was deleted.

18 changes: 0 additions & 18 deletions MLAgentBench/benchmarks/llm-merging/env/llm_merging/data.py

This file was deleted.

157 changes: 0 additions & 157 deletions MLAgentBench/benchmarks/llm-merging/env/llm_merging/evaluation.py

This file was deleted.

59 changes: 0 additions & 59 deletions MLAgentBench/benchmarks/llm-merging/env/llm_merging/main.py

This file was deleted.

Loading

0 comments on commit 9b61e15

Please sign in to comment.