Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding period to name argument of Experiment modifies function names. #913

Open
cwitkowitz opened this issue Mar 23, 2023 · 2 comments
Open

Comments

@cwitkowitz
Copy link

I've stumbled across a weird issue that occurs if I simply change Experiment('hello_config') to Experiment('hello_config.') in the following example (from the quickstart guide):

from sacred import Experiment

ex = Experiment('hello_config')

@ex.config
def my_config():
    recipient = "world"
    message = "Hello %s!" % recipient

@ex.automain
def my_main(message):
    print(message)

This results in the following error:

Usage:
  test.py [(with UPDATE...)] [options]
  test.py help [COMMAND]
  test.py (-h | --help)
  test.py COMMAND [(with UPDATE...)] [options]
Error: Command "my_main" not found. Available commands are: rint_config, rint_dependencies, ave_config, rint_named_configs, y_main
@thequilo
Copy link
Collaborator

Hey @cwitkowitz! Thanks for bringing this up! I remember that this issue, or at least something related to periods in experiment or config names, came already up some time ago (before I became a collaborator), but I don't remember which issue it was...

This is clearly not the desired behavior. But, what is desired here? Should it "just work" or should this become an error?

@cwitkowitz
Copy link
Author

I think either solution would be fine, however, from a user-pointing perspective the experiment name is just a string, so it seems one should be able to specify any arbitrary string. The main problem is that the behavior is completely unexpected and hard to trace back to having a period in the config name. As far as I am aware, there is also nothing in the docs that indicates this can happen.

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

No branches or pull requests

2 participants