Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix a bug in KGFBWorkspace (about data loading) #495

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix a bug in factor_execution_template_v2
  • Loading branch information
WinstonLiyt committed Nov 25, 2024
commit a6a097d48e4ed2943f9b86c7546b8094444dc4dd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import h5py

import numpy as np
import pandas as pd
from feat01 import feat_eng
@@ -12,5 +12,5 @@ else:

X, y, p = feat_eng(X, y)

with h5py.File('result.h5', 'w') as hf:
hf.create_dataset('default', data=X)
X = pd.dataframe(X)
X.to_hdf("result.h5", key="data", mode="w")
4 changes: 1 addition & 3 deletions rdagent/scenarios/kaggle/experiment/scenario.py
Original file line number Diff line number Diff line change
@@ -128,9 +128,7 @@ def background(self) -> str:
Path(__file__).resolve()
/ Path(KAGGLE_IMPLEMENT_SETTING.template_path).resolve()
/ KAGGLE_IMPLEMENT_SETTING.competition
/ "train.py"
if KAGGLE_IMPLEMENT_SETTING.template_path != "rdagent/scenarios/kaggle/tpl_ex"
else "main.py"
/ ("train.py" if KAGGLE_IMPLEMENT_SETTING.template_path != "rdagent/scenarios/kaggle/tpl_ex" else "main.py")
).read_text()

background_prompt = (