mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
1d2b8b9867
* rename meta_tpl * use a isolated coder to deal with model feature selection and refine the structure * fix CI * fix: fix some errors in scenario.py, proposal.py and runner.py and several complex competition scenarios(#365) * fix several bugs in proposal and runner * fix a bug in feedback-prize-english-language-learning * fix some bugs and templates * fix the bug in optiver and nlp problem * delete unnecessary codes * remove unnecessary codes * complete forest and s4e8 * push * feedback & s4e8 & forest * optiver finished * s3e11 & s3e26 * s4e9 finished * sf-crime finished * the last one finished --------- Co-authored-by: WinstonLiyt <104308117+WinstonLiyt@users.noreply.github.com> Co-authored-by: WinstonLiyte <1957922024@qq.com>
21 lines
738 B
Plaintext
21 lines
738 B
Plaintext
import os
|
|
import pickle
|
|
|
|
import numpy as np
|
|
import pandas as pd
|
|
import torch
|
|
from model import fit, predict
|
|
|
|
train_X = pd.DataFrame(np.random.randn(8, 30), columns=[f"{i}" for i in range(30)])
|
|
train_y = pd.Series(np.random.randint(0, 2, 8))
|
|
valid_X = pd.DataFrame(np.random.randn(8, 30), columns=[f"{i}" for i in range(30)])
|
|
valid_y = pd.Series(np.random.randint(0, 2, 8))
|
|
|
|
model = fit(train_X, train_y, valid_X, valid_y)
|
|
execution_model_output = predict(model, valid_X)
|
|
|
|
execution_feedback_str = f"Execution successful, output numpy ndarray shape: {execution_model_output.shape}"
|
|
|
|
pickle.dump(execution_model_output, open("execution_model_output.pkl", "wb"))
|
|
pickle.dump(execution_feedback_str, open("execution_feedback_str.pkl", "wb"))
|