Changeset 1105
- Timestamp:
- 03/13/21 00:46:26 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/FramsticksCLI.py
r1092 r1105 7 7 import argparse 8 8 import numpy as np 9 import framsreader # only needed for mutation: https://pypi.org/project/framsreader 9 from framsfiles import reader as framsreader 10 from framsfiles import writer as framswriter 10 11 11 12 … … 36 37 GETSIMPLEST_CMD = "getsimplest" 37 38 GETSIMPLEST_FILE = "simplest.gen" 38 EVALUATE_CMD = "evaluate eval-allcriteria.sim" # the .sim file must be compatible with the standard-eval expdef39 EVALUATE_CMD = "evaluate eval-allcriteria.sim" # the .sim file must be compatible with the standard-eval expdef 39 40 EVALUATE_FILE = "genos_eval.json" 40 41 CROSSOVER_CMD = "crossover" … … 127 128 outfile.write(genotype) 128 129 else: 129 outfile.write("org:\n") 130 outfile.write("genotype:~\n") 131 outfile.write(genotype + "~\n\n") # TODO proper quoting of special characters in genotype... 130 outfile.write(framswriter.from_collection({"_classname": "org", "genotype": genotype})) 131 outfile.write("\n") 132 132 outfile.close() 133 133 return relname, absname … … 304 304 # - "vectorize" crossover so that many genotypes is handled in one call. Even better, use .so/.dll direct communication to CLI 305 305 # - use threads for non-blocking reading from frams' stdout and thus not relying on specific strings printed by frams 306 # - a pool of binaries running simultaneously, balance load - in particular evaluation 307 # - if we read genotypes in "org:" format anywhere: import https://pypi.org/project/framsreader and use it if successful, 308 # if not then print a message "framsreader not available, using simple internal method to save a genotype" and proceed as it is now. 309 # We should use the proper writer to handle all special cases like quoting special characters etc. 306 # - a pool of binaries running simultaneously, balance load - in particular, evaluation 310 307 311 308 parsed_args = parseArguments()
Note: See TracChangeset
for help on using the changeset viewer.