File size: 1,051 Bytes
ab331fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from __future__ import annotations
import sys
from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parents[1]

if str(REPO_ROOT) not in sys.path:
    sys.path.insert(0, str(REPO_ROOT))

MODEL_PREP_DIR = REPO_ROOT / "model" / "prep"
MODEL_OUT_DIR = REPO_ROOT / "model_out"

def test_model_weights_exist():
    weights_path = MODEL_OUT_DIR / "skill_classifier.pt"
    assert weights_path.exists(), f"Missing model weights, run pipeline.py: {weights_path}"


def test_prepared_data_exist():
    prepared_data_path = MODEL_PREP_DIR / "prepared_data.npz"
    assert prepared_data_path.exists(), f"Missing prepared data, run pipeline.py: {prepared_data_path}"


def test_label_vocab_exist():
    vocab_path = MODEL_PREP_DIR / "label_vocab.json"
    assert vocab_path.exists(), f"Missing label vocab, run pipeline.py: {vocab_path}"


def test_vectorizer_exist():
    vectorizer_path = MODEL_PREP_DIR / "vectorizer.pkl"
    assert vectorizer_path.exists(), f"Missing vectorizer, run pipeline.py: {vectorizer_path}"