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

seed_run_target.txt example doesn't work #139

Open
jmmcd opened this issue Oct 28, 2021 · 0 comments
Open

seed_run_target.txt example doesn't work #139

jmmcd opened this issue Oct 28, 2021 · 0 comments

Comments

@jmmcd
Copy link
Collaborator

jmmcd commented Oct 28, 2021

There are a couple of issues.

The seed population needs updating to new grammar style - done.

In subtree_parse, the snippet match was failing due to whitespace. I believe we can just strip that whitespace so the match succeeds - done. But code owners, please confirm this makes sense. Here is what I did -- I added rstrip().

    # FIXME I am stripping whitespace from end of
    # params['REVERSE_MAPPING_TARGET'] using rstrip(), as this extra
    # whitespace is preventing the match. See GitHub #137.

    if largest_snippet != params['REVERSE_MAPPING_TARGET'].rstrip():

Remaining error:

alpha:src jmmcd$ python ponyge.py --parameters ../parameters/seed_run_target.txt

Start:	 2021-10-28 09:55:23.442861

Traceback (most recent call last):
  File "ponyge.py", line 31, in <module>
    mane()
  File "ponyge.py", line 21, in mane
    set_params(sys.argv[1:])  # exclude the ponyge.py arg itself
  File "/Users/jmmcd/OneDrive - National University of Ireland, Galway/GitHub/PonyGE2/src/algorithm/parameters.py", line 367, in set_params
    params['SEED_INDIVIDUALS'] = load_population(
  File "/Users/jmmcd/OneDrive - National University of Ireland, Galway/GitHub/PonyGE2/src/operators/initialisation.py", line 491, in load_population
    ind = GE_LR_parser.main()
  File "/Users/jmmcd/OneDrive - National University of Ireland, Galway/GitHub/PonyGE2/src/scripts/GE_LR_parser.py", line 346, in main
    check_ind_from_parser(solution, params['REVERSE_MAPPING_TARGET'])
  File "/Users/jmmcd/OneDrive - National University of Ireland, Galway/GitHub/PonyGE2/src/utilities/representation/check_methods.py", line 96, in check_ind_from_parser
    new_ind = individual.Individual(ind.genome, None)
AttributeError: 'NoneType' object has no attribute 'genome'

I can't fix this, I don't know this area of the code.

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

1 participant