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

feat: Kaggle loop update (Feature & Model) #241

Merged
merged 70 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
49541c6
Init todo
you-n-g Jul 17, 2024
aa4c7e5
Evaluation & dataset
taozhiwang Jul 23, 2024
c51a6f0
Generate new data
taozhiwang Jul 23, 2024
90bd7e3
dataset generation
taozhiwang Jul 24, 2024
864f5a0
add the result
taozhiwang Jul 24, 2024
f9b57b9
Analysis
taozhiwang Jul 24, 2024
db82b67
Factor update
taozhiwang Jul 24, 2024
52dc938
Updates
taozhiwang Jul 25, 2024
702c830
Reformat analysis.py
taozhiwang Jul 25, 2024
ac80c93
CI fix
taozhiwang Jul 25, 2024
9357628
Merge branch 'main' into benchmark
you-n-g Jul 25, 2024
3088525
Merge pull request #112 from microsoft/benchmark
taozhiwang Jul 25, 2024
ab552ff
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Jul 26, 2024
fc01635
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Jul 29, 2024
681af16
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Jul 30, 2024
a4643de
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Jul 31, 2024
cc48faa
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Aug 6, 2024
3ff2406
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Aug 26, 2024
96a5e9e
Merge branch 'main' of https://github.com/microsoft/RD-Agent
xisen-w Aug 28, 2024
fa25aaf
Revised Preprocessing & Supported Random Forest
xisen-w Aug 28, 2024
5537ff0
Revised to support three models with feature
xisen-w Aug 30, 2024
818bf0b
Further revised prompts
xisen-w Aug 30, 2024
d3f91cb
Slight Revision
xisen-w Aug 30, 2024
79bdf4c
docs: update contributors (#230)
Hytn Aug 28, 2024
94a22cb
Revised to support three models with feature
xisen-w Aug 30, 2024
e8294a6
Further revised prompts
xisen-w Aug 30, 2024
a8e8dd9
Slight Revision
xisen-w Aug 30, 2024
f218b93
Merge branch 'model-loop-update' of https://github.com/microsoft/RD-A…
xisen-w Aug 30, 2024
ce8eeed
feat: kaggle model and feature (#238)
peteryang1 Sep 2, 2024
a8b2df9
feat: continue kaggle feature and model coder (#239)
peteryang1 Sep 2, 2024
c718143
finish the first round of runner (#240)
peteryang1 Sep 3, 2024
b2b7572
Optimized the factor scenario and added the front-end.
WinstonLiyt Sep 3, 2024
fed9a69
fix a small bug
WinstonLiyt Sep 4, 2024
05db6f1
fix a typo
WinstonLiyt Sep 4, 2024
88047f1
update the kaggle scenario
WinstonLiyt Sep 4, 2024
33b7b69
delete model_template folder
peteryang1 Sep 4, 2024
913ce10
use experiment to run data preprocess script
peteryang1 Sep 4, 2024
0135d21
add source data to scenarios
peteryang1 Sep 4, 2024
0de82d2
minor fix
peteryang1 Sep 4, 2024
ecbef88
minor bug fix
peteryang1 Sep 4, 2024
e8981ef
train.py debug
taozhiwang Sep 8, 2024
4da3957
fixed a bug in train.py and added some TODOs
WinstonLiyt Sep 8, 2024
b902a9e
For Debugging
xisen-w Sep 9, 2024
e6f95f5
fix two small bugs in based_exp
WinstonLiyt Sep 9, 2024
0ac70c0
fix some bugs
WinstonLiyt Sep 9, 2024
a6b603a
update preprocess
WinstonLiyt Sep 9, 2024
b4dd339
fix a bug in preprocess
WinstonLiyt Sep 9, 2024
fcd0f20
fix a bug in train.py
WinstonLiyt Sep 9, 2024
1e90441
reformat
WinstonLiyt Sep 9, 2024
121f5e0
Follow-up
xisen-w Sep 9, 2024
f915bc0
Merge branch 'model-loop-model-debug' into model-loop-update
xisen-w Sep 9, 2024
efb18a5
fix a bug in train.py
WinstonLiyt Sep 9, 2024
91ca2e9
fix a bug in workspace
WinstonLiyt Sep 9, 2024
966da07
fix a bug in feature duplication
WinstonLiyt Sep 9, 2024
d084e75
fix a bug in feedback
WinstonLiyt Sep 9, 2024
993b39e
fix a bug in preprocessed data
WinstonLiyt Sep 10, 2024
84e2447
Merge branch 'model-loop-update' of https://github.com/microsoft/RD-A…
xisen-w Sep 10, 2024
7effdf0
fix a bug om feature engineering
WinstonLiyt Sep 10, 2024
25a64c6
Merge branch 'main' into model-loop-update
WinstonLiyt Sep 10, 2024
275e526
fix a ci error
WinstonLiyt Sep 10, 2024
d1fa409
Debugged & Connected
xisen-w Sep 10, 2024
2aab52d
Merge branch 'model-loop-update' of https://github.com/microsoft/RD-A…
xisen-w Sep 10, 2024
c2dfbb8
Fixed error on feedback & added other fixes
xisen-w Sep 11, 2024
ffb2ff5
fix CI errors
WinstonLiyt Sep 11, 2024
3695a7b
fix a CI bug
WinstonLiyt Sep 11, 2024
1de9557
fix: fix_dotenv_error (#257)
SunsetWolf Sep 10, 2024
09812dc
chore(main): release 0.2.1 (#249)
you-n-g Sep 10, 2024
e0bc856
init a scenario for kaggle feature engineering
WinstonLiyt Aug 26, 2024
097d9f3
delete error codes
WinstonLiyt Sep 11, 2024
4ab8b96
Delete rdagent/app/kaggle_feature/conf.py
WinstonLiyt Sep 11, 2024
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
Next Next commit
add the result
  • Loading branch information
taozhiwang committed Jul 24, 2024
commit 864f5a0c2cff0d83765f0dd67a90597bc3bb0754
24 changes: 24 additions & 0 deletions rdagent/app/quant_factor_benchmark/eval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import os
from pathlib import Path
import pickle
import time
from rdagent.app.qlib_rd_loop.conf import PROP_SETTING
from rdagent.scenarios.qlib.factor_experiment_loader.json_loader import (
FactorTestCaseLoaderFromJsonFile,
Expand All @@ -11,6 +15,7 @@
from rdagent.core.scenario import Scenario
from rdagent.scenarios.qlib.experiment.factor_experiment import QlibFactorScenario

from pprint import pprint

# 1.read the settings
bs = BenchmarkSettings()
Expand All @@ -35,6 +40,25 @@
# 5.run the eval
res = eval_method.eval()

# 6.save the result
pprint(res)

res_workspace = (Path().cwd() / "git_ignore_folder" / "eval_results").absolute()
print(str(res_workspace))

# Save results
timestamp = time.strftime("%Y%m%d-%H%M%S", time.localtime(time.time()))

if not os.path.exists(str(res_workspace)):
os.makedirs(str(res_workspace))

df_file_path = res_workspace / ("result_" + timestamp + ".csv")
res_pkl_path = res_workspace / ("res_promptV2" + timestamp + ".pkl")
res_pkl_path = res_workspace / ("res_promptV2" + timestamp + ".pkl")
with open(str(res_pkl_path), "wb") as file:
# file.write(str(res))
pickle.dump(res, file)

# TODO:
# - Run it:
# - factor input data generator;
Expand Down
2 changes: 1 addition & 1 deletion rdagent/components/benchmark/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BenchmarkSettings(BaseSettings):

bench_data_path: Path = DIRNAME / "example.json"

bench_test_round: int = 10
bench_test_round: int = 1
bench_test_case_n: Optional[int] = None # how many test cases to run; If not given, all test cases will be run

bench_method_cls: str = "rdagent.components.coder.factor_coder.CoSTEER.FactorCoSTEER"
Expand Down
72 changes: 0 additions & 72 deletions rdagent/components/benchmark/generate_dataset.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def filter_evolvable_subjects_by_feedback(self, evo: EvolvableSubjects, feedback
assert len(evo.sub_workspace_list) == len(feedback)

for index in range(len(evo.sub_workspace_list)):
if not feedback[index].final_decision:
if feedback[index] and not feedback[index].final_decision:
evo.sub_workspace_list[index].clear()
return evo
2 changes: 1 addition & 1 deletion rdagent/components/coder/factor_coder/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FactorImplementSettings(BaseSettings):
class Config:
env_prefix = "FACTOR_CODER_" # Use FACTOR_CODER_ as prefix for environment variables

coder_use_cache: bool = False
coder_use_cache: bool = True
data_folder: str = str(
(Path().cwd() / "git_ignore_folder" / "factor_implementation_source_data").absolute(),
)
Expand Down