Example #1
0
    if introspection.is_std_lib(dependency) and not arguments.standard:
        continue

    # Check presency and version
    if dependency in packages:
        present = True
        if arguments.version: version = packages[dependency]
    else:
        present = introspection.is_present_package(dependency)
        version = None

    # Check whether the current package is present
    if present:

        # Show package name, whether it's present and version number (if requested)
        if version is not None:
            log.success(dependency + ": present (version " + version + ")")
        else:
            log.success(dependency + ": present")

    # The package is not present
    else:
        log.error(dependency + ": not found")

    # List the PTS modules that have this dependency
    if arguments.modules:
        for script in script_list:
            log.info("    " + script.split("PTS/pts/")[1])

# -----------------------------------------------------------------
Example #2
0
seed = config.seed
prng = setup_prng(seed)

# -----------------------------------------------------------------

# path to the GA object
path = fs.join(fs.cwd(), "ga.pickle")

# Path to the parameter table
parameters_path = fs.join(fs.cwd(), "parameters.dat")

# -----------------------------------------------------------------

# Inform the user
log.info("Creating the GA engine ...")

# Genome instance
genome = G1DList(2)
genome.setParams(rangemin=0., rangemax=50., bestrawscore=0.00, rounddecimal=2)
genome.initializator.set(initializators.G1DListInitializatorReal)
genome.mutator.set(mutators.G1DListMutatorRealGaussian)

#genome.evaluator.set(chi_squared_function)

# Inform the user
log.info("Creating the GA engine ...")

# Genetic algorithm instance
ga = GAEngine(genome)
ga.terminationCriteria.set(RawScoreCriteria)
Example #3
0
    # Get the list of PTS scripts for this dependency
    script_list = dependencies[dependency]

    # Skip packages from the standard library, unless the appropriate flag is enabled
    if introspection.is_std_lib(dependency) and not arguments.standard: continue

    # Check presency and version
    if dependency in packages:
        present = True
        if arguments.version: version = packages[dependency]
    else:
        present = introspection.is_present_package(dependency)
        version = None

    # Check whether the current package is present
    if present:

        # Show package name, whether it's present and version number (if requested)
        if version is not None: log.success(dependency + ": present (version " + version + ")")
        else: log.success(dependency + ": present")

    # The package is not present
    else: log.error(dependency + ": not found")

    # List the PTS modules that have this dependency
    if arguments.modules:
        for script in script_list: log.info("    " + script.split("PTS/pts/")[1])

# -----------------------------------------------------------------
Example #4
0
# -----------------------------------------------------------------

# Create the command-line parser
parser = argparse.ArgumentParser()
parser.add_argument("skifile", type=str, help="the name of the ski file")
parser.add_argument("threads", type=int, help="the number of parallel threads")
parser.add_argument("processes", type=int, help="the number of parallel processes")

# Parse the command line arguments
arguments = parser.parse_args()

# -----------------------------------------------------------------

# Initialize the logger
log.info("Starting estimate script ...")

# -----------------------------------------------------------------

# Determine the full path to the parameter file
ski_path = os.path.abspath(arguments.file)

# Create and run a ResourceEstimator oject
estimator = ResourceEstimator()
estimator.run(ski_path, arguments.processes, arguments.threads)

# Inform the user about the resource requirements
log.info("This simulation requires " + estimator.memory + " GB of virtual memory")
#log.info("This simulation requires a walltime of " + estimator.walltime)

# -----------------------------------------------------------------
Example #5
0
seed = config.seed
prng = setup_prng(seed)

# -----------------------------------------------------------------

# path to the GA object
path = fs.join(fs.cwd(), "ga.pickle")

# Path to the parameter table
parameters_path = fs.join(fs.cwd(), "parameters.dat")

# -----------------------------------------------------------------

# Inform the user
log.info("Creating the GA engine ...")

# Genome instance
genome = G1DList(2)
genome.setParams(rangemin=0., rangemax=50., bestrawscore=0.00, rounddecimal=2)
genome.initializator.set(initializators.G1DListInitializatorReal)
genome.mutator.set(mutators.G1DListMutatorRealGaussian)

#genome.evaluator.set(chi_squared_function)

# Inform the user
log.info("Creating the GA engine ...")

# Genetic algorithm instance
ga = GAEngine(genome)
ga.terminationCriteria.set(RawScoreCriteria)