Skip to content

UtilityFunction not available anymore #540

Closed

Description

@nilsleh

from bayes_opt.util import UtilityFunction

In the shown example, the UtilityFunction is imported but it doesn't seem to be part of bayes_opt anymore.

import bayes_opt

from bayes_opt.util import UtilityFunction

yiels ImportError: cannot import name 'UtilityFunction' from 'bayes_opt.util'

Version:
bayes_opt: 2.0.3

Activity

  1. t-muser commented on Jan 15, 2025

    @t-muser
    Member

    Hi @nilsleh,

    thanks for raising the issue. I believe that the file in question should probably be removed from the repository, but I wasn't entirely committed to doing that since I didn't initially add it (see also #503). But you're right in that it has not been maintained correctly and the mismatch is misleading.

    May I ask what your usecase is? If there's a good reason to keep it, I can work on making it functional. Otherwise I will probably go through with my original plan and delete it soon.

  2. nilsleh commented on Jan 15, 2025

    @nilsleh
    Author

    Hi @Till-M , thanks for your reply. The usecase is actually in the linked issue for RayTune where I encountered the bug, and then was searching this repo for UtilityFunction and couldn't find it in the src files anymore. So personally I don't have a use case for the linked file, here, it is just the only one where I found UtilityFunction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions