Skip to content

Commit

Permalink
Changes in the documentation and removal of PyPet includes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdiazpier committed Oct 19, 2018
1 parent 9b06534 commit bb305d4
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 29 deletions.
7 changes: 2 additions & 5 deletions bin/l2l-fun-ce-gaussmix.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

import numpy as np

from pypet import Environment
from pypet import pypetconstants
from l2l.utils.environment import Environment

from l2l.optimizees.functions.optimizee import FunctionGeneratorOptimizee
from l2l.optimizees.functions.benchmarked_functions import BenchmarkedFunctions
Expand Down Expand Up @@ -39,14 +38,12 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
freeze_input=True,
multiproc=True,
use_scoop=True,
wrap_mode=pypetconstants.WRAP_MODE_LOCAL,
automatic_storing=True,
log_stdout=False, # Sends stdout to logs
)
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-ce.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-es.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def run_experiment():
print("All output logs can be found in directory ", paths.logs_path)

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(
trajectory=trajectory_name,
filename=paths.output_dir_path,
Expand Down
6 changes: 2 additions & 4 deletions bin/l2l-fun-face.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import numpy as np

from pypet import Environment
from pypet import pypetconstants
from l2l.utils.environment import Environment

from l2l.optimizees.functions import tools as function_tools
from l2l.optimizees.functions.benchmarked_functions import BenchmarkedFunctions
Expand Down Expand Up @@ -36,14 +35,13 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
freeze_input=True,
multiproc=True,
use_scoop=True,
wrap_mode=pypetconstants.WRAP_MODE_LOCAL,
automatic_storing=True,
log_stdout=False, # Sends stdout to logs
)
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-gd.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-gs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
4 changes: 2 additions & 2 deletions bin/l2l-fun-pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os

import numpy as np
from pypet import Environment
from l2l.utils.environment import Environment

from l2l.optimizees.functions import tools as function_tools
from l2l.optimizees.functions.benchmarked_functions import BenchmarkedFunctions
Expand Down Expand Up @@ -33,7 +33,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-fun-sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():
traj_file = os.path.join(paths.output_dir_path, 'data.h5')

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
Expand Down
4 changes: 2 additions & 2 deletions bin/l2l-funall.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import itertools

import numpy as np
from pypet import Environment
from l2l.utils.environment import Environment

from l2l.optimizees.functions.benchmarked_functions import BenchmarkedFunctions
from l2l.optimizees.functions.optimizee import FunctionGeneratorOptimizee
Expand Down Expand Up @@ -73,7 +73,7 @@ def main():
optimizer_parameters = optimizer_parameters_fn()

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(trajectory=name, filename=traj_file, file_title='{} data'.format(name),
comment='{} data'.format(name),
# freeze_input=True,
Expand Down
2 changes: 1 addition & 1 deletion bin/l2l-mnist-ce.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def run_experiment():
print("All output logs can be found in directory ", paths.logs_path)

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(
trajectory=trajectory_name,
filename=paths.output_dir_path,
Expand Down
4 changes: 2 additions & 2 deletions bin/l2l-mnist-es.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime

import numpy as np
from pypet import Environment
from l2l.utils.environment import Environment

from l2l import dict_to_list
from l2l.logging_tools import create_shared_logger_data, configure_loggers
Expand Down Expand Up @@ -30,7 +30,7 @@ def run_experiment():
print("All output logs can be found in directory ", paths.logs_path)

# Create an environment that handles running our simulation
# This initializes a PyPet environment
# This initializes an environment
env = Environment(
trajectory=trajectory_name,
filename=paths.output_dir_path,
Expand Down
7 changes: 2 additions & 5 deletions bin/l2l-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

import logging.config

from pypet import Environment
from pypet import pypetconstants
from l2l.utils.environment import Environment

from l2l.logging_tools import create_shared_logger_data, configure_loggers
from l2l.optimizees.optimizee import Optimizee
Expand Down Expand Up @@ -41,16 +40,14 @@ def main():
print("All output logs can be found in directory ", paths.logs_path)

# Create an environment that handles running our simulation
# This initializes a PyPet environment. See Pypet documentation for more details on environment and trajectory.
# This initializes an environment. This environment is based on the Pypet implementation.
# Uncomment 'freeze_input', 'multipproc', 'use_scoop' and 'wrap_mode' lines to disable running the experiment
# across cores and nodes.
env = Environment(trajectory=name, filename=paths.output_dir_path, file_title='{} data'.format(name),
comment='{} data'.format(name),
add_time=True,
freeze_input=False,
multiproc=True,
use_scoop=True,
wrap_mode=pypetconstants.WRAP_MODE_LOCAL,
automatic_storing=True,
log_stdout=False, # Sends stdout to logs
)
Expand Down
2 changes: 1 addition & 1 deletion l2l/optimizers/gridsearch/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from collections import namedtuple

import numpy as np
from pypet.utils.explore import cartesian_product
from l2l.utils.tools import cartesian_product

from l2l import DictEntryType
from l2l import dict_to_list
Expand Down
2 changes: 1 addition & 1 deletion l2l/optimizers/optimizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import namedtuple

from pypet import cartesian_product
from l2l.utils.tools import cartesian_product

from l2l import get_grouped_dict

Expand Down

0 comments on commit bb305d4

Please sign in to comment.