microsoft / RD-Agent

Research and development (R&D) is crucial for the enhancement of industrial productivity, especially in the AI era, where the core aspects of R&D are mainly focused on data and models. We are committed to automate these high-value generic R&D processes through our open source R&D automation tool RD-Agent, which let AI drive data-driven AI.
https://rdagent.azurewebsites.net/
MIT License
161 stars 13 forks source link

fix: check if gen_df is None #216

Closed qew21 closed 4 weeks ago

qew21 commented 4 weeks ago

Description

Motivation and Context

How Has This Been Tested?

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

Error when gen_df is None

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/root/anaconda3/envs/rdagent/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/root/remote/RD-Agent/rdagent/components/coder/factor_coder/CoSTEER/evaluators.py", line 610, in evaluate
    ) = self.value_evaluator.evaluate(implementation=implementation, gt_implementation=gt_implementation)
  File "/root/remote/RD-Agent/rdagent/components/coder/factor_coder/CoSTEER/evaluators.py", line 387, in evaluate
    feedback_str, single_column_result = FactorRowCountEvaluator(self.scen).evaluate(
  File "/root/remote/RD-Agent/rdagent/components/coder/factor_coder/CoSTEER/evaluators.py", line 249, in evaluate
    if gen_df.shape[0] == gt_df.shape[0]:
AttributeError: 'NoneType' object has no attribute 'shape'
"""

📚 Documentation preview 📚: https://RDAgent--216.org.readthedocs.build/en/216/