1
0
mirror of https://github.com/ltcptgeneral/cs239-caching.git synced 2025-03-30 03:35:18 +00:00
Arthur Lu f7903f4fea add individual config files for each strategy,
config file path can be specified as the second argument
2025-02-28 19:17:44 +00:00

18 lines
469 B
Python

import os
import yaml
import sys
CONFIG_FILE = sys.argv[1]
def load_config():
with open(CONFIG_FILE, "r") as f:
return yaml.safe_load(f)
config = load_config()
# Read from environment variable or fallback to YAML value
CACHE_STRATEGY = os.getenv("CACHE_STRATEGY", config.get("cache_strategy", "Baseline"))
CACHE_LIMIT = config.get("cache_limit", 10)
L2_CACHE_LIMIT = config.get("l2_cache_limit", 100)
DB_FILE = config.get("db_file", "llmData_sns.json")