Skip to content

No clear error message, when writing comment in config definition line #698

@jensheit

Description

@jensheit
import sacred
ex = sacred.Experiment('test')


@ex.config
def config():   # some comment
    a = 1


@ex.automain
def main(a):
    print(a + 1)

The above code example create an AssertionError in the following sacred file:

sacred/config/config_scope.py", line 102, in get_function_body

without any further information.
Is this desired behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions