File size: 519 Bytes
c5c085b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import pandas as pd
import numpy as np
import pickle
import os
import sys

# Add path to find models
sys.path.append(os.getcwd())

from models.causal_discovery import get_causal_model

# Mock Data
df = pd.DataFrame(np.random.randn(100, 5), columns=['open', 'high', 'low', 'close', 'volume'])
clean_df = df

print("Init Causal...")
model = get_causal_model()

print("Fit Causal...")
model.fit(clean_df)

print("Pickle Causal...")
with open("causal_debug.pkl", "wb") as f:
    pickle.dump(model, f)

print("✅ Success")