Skip to content

Conversation

@eddiebergman
Copy link
Contributor

@eddiebergman eddiebergman commented Nov 15, 2022

Seems some tests were failing stochastically in AutoML::fit() -> _fit_cleanup(), many complaining that self._logger was None and calling methods like info and exception on this None object were failing (as expected). Scrolling further up in the stack traces, there was a seemingly unrelated failure.

     all_loaded_modules = sys.modules.keys()
     preload = [
        loaded_module
        for loaded_module in all_loaded_modules
        if loaded_module.split(".")[0]
        in (
            "smac",
            "autosklearn",
            "numpy",
            "scipy",
            "pandas",
            "pynisher",
            "sklearn",
            "ConfigSpace",
        )
        and "logging" not in loaded_module
    ]
    # RuntimeError: dictionary changed size during iteration

My guess here is that sys.modules was slowly getting cleaned up by the garbage collector as cleanup was happening, causing this iteration to fail. Solution was just to wrap in a list as list(sys.modules.keys()).

Will update depending on whether this fixes the issue.

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Merging #1609 (045fb68) into development (6a97f72) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1609      +/-   ##
===============================================
- Coverage        83.32%   83.23%   -0.10%     
===============================================
  Files              156      156              
  Lines            11927    11927              
  Branches          1896     1896              
===============================================
- Hits              9938     9927      -11     
- Misses            1422     1431       +9     
- Partials           567      569       +2     

Impacted file tree graph

@eddiebergman eddiebergman merged commit 5a90a19 into development Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants