Skip to content

Commit

Permalink
fix KGFactorRunner cache system bug (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
XianBW authored Oct 23, 2024
1 parent 5531b17 commit adcf599
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions rdagent/scenarios/kaggle/developer/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def develop(self, exp: KGModelExperiment) -> KGModelExperiment:


class KGFactorRunner(KGCachedRunner[KGFactorExperiment]):
@cache_with_pickle(KGCachedRunner.get_cache_key, KGCachedRunner.assign_cached_result)
def develop(self, exp: KGFactorExperiment) -> KGFactorExperiment:
current_feature_file_count = len(list(exp.experiment_workspace.workspace_path.glob("feature/feature*.py")))
implemented_factor_count = 0
Expand All @@ -91,12 +92,6 @@ def develop(self, exp: KGFactorExperiment) -> KGFactorExperiment:
if exp.based_experiments and exp.based_experiments[-1].result is None:
exp.based_experiments[-1] = self.init_develop(exp.based_experiments[-1])

if RUNNER_SETTINGS.cache_result:
cache_hit, result = self.get_cache_result(exp)
if cache_hit:
exp.result = result
return exp

env_to_use = {"PYTHONPATH": "./"}

result = exp.experiment_workspace.execute(run_env=env_to_use)
Expand All @@ -106,7 +101,4 @@ def develop(self, exp: KGFactorExperiment) -> KGFactorExperiment:

exp.result = result

if RUNNER_SETTINGS.cache_result:
self.dump_cache_result(exp, result)

return exp

0 comments on commit adcf599

Please sign in to comment.