Commit db97d179 authored by YaningGao's avatar YaningGao
Browse files

minor

parent 2359fbe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,4 +5,4 @@ env1:
    prompt_format: free_think
    use_accuracy_reward: false
  train_size: 10000
  test_size: 2
 No newline at end of file
  test_size: 512
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ output_dir: "inference_outputs"
# WandB configuration
use_wandb: true
wandb_project: "vagen-inference"
val_generations_to_log_to_wandb: 10 

# Display settings
show_progress: true
 No newline at end of file
val_generations_to_log_to_wandb: 10
 No newline at end of file
+11 −11
Original line number Diff line number Diff line
@@ -15,15 +15,15 @@ models:
  #   tensor_parallel_size: 2
  #   gpu_memory_utilization: 0.9

  # gpt4o:
  #   provider: openai
  #   model_name: gpt-4o
  #   max_tokens: 1024
  #   temperature: 0.7
  #   presence_penalty: 0.0
  #   frequency_penalty: 0.0
  #   max_retries: 3
  #   timeout: 60
  gpt4o:
    provider: openai
    model_name: gpt-4o
    max_tokens: 1024
    temperature: 0.7
    presence_penalty: 0.0
    frequency_penalty: 0.0
    max_retries: 3
    timeout: 60

  # gpt4_vision:
  #   provider: openai
@@ -35,9 +35,9 @@ models:
  #   max_retries: 3
  #   timeout: 60

  claude_3_haiku:
  claude_3_sonnet:
    provider: claude
    model_name: claude-3-haiku-20240307
    model_name: claude-3-7-sonnet-20250219
    max_tokens: 1024
    temperature: 0.7
  
+6 −0
Original line number Diff line number Diff line
@@ -7,3 +7,9 @@ export OPENAI_API_KEY=<sk-your_openai_api_key>
```
export ANTHROPIC_API_KEY=<your_claude_api_key>
```

## Test your inference pipeline
```
python vagen/server/server.py
./scripts/exps/prompting/frozenlake/run.sh
```
 No newline at end of file

vagen/inference/config.py

deleted100644 → 0
+0 −44
Original line number Diff line number Diff line
"""
Utility functions for config loading and management.
"""

import yaml
import json
import os
from typing import Dict, Any

def load_config(config_path: str) -> Dict:
    """
    Load configuration from YAML file.

    Args:
        config_path: Path to configuration file

    Returns:
        Configuration dictionary
    """
    with open(config_path, "r") as f:
        config = yaml.safe_load(f)
    return config

def save_configs(output_dir: str, model_config: Dict, inference_config: Dict, args: Any) -> None:
    """
    Save configurations to output directory.

    Args:
        output_dir: Output directory
        model_config: Model configuration
        inference_config: Inference configuration
        args: Command line arguments
    """
    # Save model config
    with open(os.path.join(output_dir, "model_config.yaml"), "w") as f:
        yaml.dump(model_config, f, default_flow_style=False)

    # Save inference config
    with open(os.path.join(output_dir, "inference_config.yaml"), "w") as f:
        yaml.dump(inference_config, f, default_flow_style=False)

    # Save command line args
    with open(os.path.join(output_dir, "args.json"), "w") as f:
        json.dump(vars(args), f, indent=2)
 No newline at end of file
Loading