Skip to content

Better error messages for ops forbidden in Eager mode #154

Description

@rnett

Currently, if you try to use placeholder in Eager mode you get a cryptic error message that says nothing about it being forbidden in eager in mode (I had to look it up on StackOverflow). As far as I'm aware there's no ops that are eager only, but I think throwing a custom exception for mode-dependent ops is reasonable and helpful.

I'd probably do this in EagerOperationBuilder.build rather than in the ops classes to catch custom created ops. If that's fine I can make a PR if a list of forbidden ops is provided (or just with placeholder).

Activity

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