Auto-PyTorch icon indicating copy to clipboard operation
Auto-PyTorch copied to clipboard

[AssertionError in `fit_pipeline()` when `pipeline_options` is not None

Open PhMueller opened this issue 3 years ago • 1 comments

Hi guys,

I was trying out your fantastic tool and found a small bug.

  • I'm submitting a ...
    • [X] bug report
    • [ ] feature request
    • [ ] support request => Please do not submit support request here, see note at the top of this template.

Issue Description

  • An exception will be raised when specifying the argument pipeline_options in the fit_pipeline function.

  • Steps To Reproduce

    1. api = TabularRegressionTask(...)
    2. api.fit_pipeline(..., pipeline_options={'early_stopping': 100})

Problem/Solution:

In api/base_task Line 1635-1638

pipeline_options = self.pipeline_options.copy().update(pipeline_options) if pipeline_options is not None \
    else self.pipeline_options.copy()

assert pipeline_options is not None

The update() function returns None.

Replacing it with the following would remove the error:

pipeline_options = {**self.pipeline_option, **pipeline_options} if pipeline_options is not None \
    else self.pipeline_options.copy()

assert pipeline_options is not None

Current workaround:

api.set_pipeline_config(**{'early_stopping': 50})
api.fit_pipeline(...) # do not specify `pipeline_options` here. 

Your Local environment

  • AutoPytorch Version: 0.2 (current master)

PhMueller avatar Aug 08 '22 07:08 PhMueller

Hey, thanks for reporting this bug. We'll incorporate this in the next release which should be released very soon.

ravinkohli avatar Aug 08 '22 15:08 ravinkohli

Hi, we have fixed this issue in the latest release. You can install it using pip install autoPyTorch==0.2.1. I am closing this issue for now.

ravinkohli avatar Aug 23 '22 16:08 ravinkohli