Files
zeekay bcc96f6f48 Add Zen Research licensing and copyright information
- Apache 2.0 License
- Zen Research DAO under Zoo Labs Inc (501(c)(3))
- San Francisco-based non-profit for open AI research
- Copyright 2025 Zen Research Authors
2025-09-29 14:50:32 -07:00

41 lines
1.2 KiB
Python

"""pytest configuration and fixtures"""
import pytest
import torch
import os
from pathlib import Path
# Base paths
BASE_DIR = Path("/Users/z/work/zen")
ZEN_ECO_DIR = BASE_DIR / "zen-eco"
ZEN_NANO_DIR = BASE_DIR / "zen-nano"
@pytest.fixture
def device():
"""Get the best available device"""
if torch.backends.mps.is_available():
return torch.device("mps")
elif torch.cuda.is_available():
return torch.device("cuda")
else:
return torch.device("cpu")
@pytest.fixture
def model_paths():
"""Dictionary of model paths"""
return {
"zen-nano": ZEN_NANO_DIR / "finetuned",
"zen-eco-instruct": ZEN_ECO_DIR / "instruct" / "finetuned",
"zen-eco-thinking": ZEN_ECO_DIR / "thinking" / "finetuned",
"zen-eco-agent": ZEN_ECO_DIR / "agent" / "finetuned",
"base-qwen3": ZEN_ECO_DIR / "base-model",
}
@pytest.fixture
def gguf_paths():
"""Dictionary of GGUF paths"""
return {
"zen-nano": ZEN_NANO_DIR / "gguf",
"zen-eco-instruct": ZEN_ECO_DIR / "instruct" / "gguf",
"zen-eco-thinking": ZEN_ECO_DIR / "thinking" / "gguf",
"zen-eco-agent": ZEN_ECO_DIR / "agent" / "gguf",
}