diff --git a/setup.sh b/setup.sh index adcde953..c4b565fe 100644 --- a/setup.sh +++ b/setup.sh @@ -1,15 +1,17 @@ # Install the packages in r1-v . cd src/r1-v -pip install -e ".[dev]" +pip install uv pip --upgrade + +uv pip install -e ".[dev]" # Addtional modules -pip install wandb==0.18.3 -pip install tensorboardx -pip install qwen_vl_utils torchvision -pip install flash-attn --no-build-isolation +uv pip install wandb==0.18.3 +uv pip install tensorboardx +uv pip install qwen_vl_utils torchvision +uv pip install flash-attn --no-build-isolation # vLLM support -pip install vllm==0.7.2 +uv pip install vllm==0.7.2 # fix transformers version -pip install git+https://github.com/huggingface/transformers.git@336dc69d63d56f232a183a3e7f52790429b871ef \ No newline at end of file +uv pip install git+https://github.com/huggingface/transformers.git@336dc69d63d56f232a183a3e7f52790429b871ef diff --git a/src/r1-v/src/open_r1/grpo.py b/src/r1-v/src/open_r1/grpo.py index 80accd15..d97e84a1 100644 --- a/src/r1-v/src/open_r1/grpo.py +++ b/src/r1-v/src/open_r1/grpo.py @@ -86,7 +86,7 @@ def accuracy_reward(completions, solution, **kwargs): if os.getenv("DEBUG_MODE") == "true": log_path = os.getenv("LOG_PATH") # local_rank = int(os.getenv("LOCAL_RANK", 0)) - with open(log_path, "a") as f: + with open(log_path, "a", encoding="utf-8") as f: f.write(f"------------- {current_time} Accuracy reward: {reward} -------------\n") f.write(f"Content: {content}\n") f.write(f"Solution: {sol}\n")