Skip to content

[tune] Handling exceptions for the analysis module when encountering nans #9364

@Nicolaus93

Description

@Nicolaus93

Hi, after running some experiments with tune I was trying to get the best configuration/log dir using get_best_config and get_best_logdir from the analysis module. Unfortunately, I had some nan values in the metric I was measuring, and both methods returned an error related to Pandas. After checking the code, I found that the line causing the error is in the function _retrieve_rows:

rows[path] = df.iloc[idx].to_dict()

In particular, if there are nan values then the variable idx will be equal to nan and that will cause the following: TypeError: Cannot index by location index with a non-integer key.
I was wondering if you could add an exception for this case, warning the user that the experiment returned some nan values. I had to spend some time understanding what was wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue, but not time-criticaltuneTune-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions