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

Generation seed not working #95

Closed
bendrissou opened this issue Apr 19, 2023 · 1 comment · Fixed by #97
Closed

Generation seed not working #95

bendrissou opened this issue Apr 19, 2023 · 1 comment · Fixed by #97

Comments

@bendrissou
Copy link

I am trying to use option --random-seed in order to be able to generate the same input when given the same seed number.

However, it's not working, as the generated inputs differ.

I have experimented with multiple grammars, including the json antlr grammar. The following is the command I am using:

grammarinator-generate JSONGenerator.JSONGenerator -r json -o tests/test_1.json -n 1 --random-seed 22 --sys-path .

The versions I tried:

grammarinator-generate 19.3.post125+geecdcb7
grammarinator-generate 19.3.post136+g350ce45
@renatahodovan
Copy link
Owner

Generating with fixed seed is only supported in single process mode for now (as the help message of --random-seed mentions). To switch to single process mode, you should add the -j=1 argument to your command.

However, this means performance loss ofc... I'll look into how support seeds across multiple processes.

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

Successfully merging a pull request may close this issue.

2 participants