Skip to content

Commit

Permalink
Edit print statements
Browse files Browse the repository at this point in the history
hsujeremy committed Oct 23, 2022
1 parent 6d87ca0 commit 5f5b247
Showing 7 changed files with 13 additions and 592 deletions.
1 change: 1 addition & 0 deletions experiments_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from phoss.experiment_analysis import ExperimentAnalysis
from phoss.experiment_group import ExperimentGroup

print('Running example experiment script')
seeds = [161, 165]
methods = ['Random', 'ASHA', 'Hyperband', 'PBT']
results = []
3 changes: 2 additions & 1 deletion landscaper_example.py
Original file line number Diff line number Diff line change
@@ -6,8 +6,9 @@

from phoss.landscaper import NormalLossDecayLandscape

print('Running example landscaper script')

max_time_steps = 100
print('Debugging Landscaper')

landscaper = NormalLossDecayLandscape(
'phoss/simulator_configs/overfit.json',
5 changes: 3 additions & 2 deletions phoss/experiment_runner.py
Original file line number Diff line number Diff line change
@@ -223,7 +223,8 @@ def _run_simulation(
ray.shutdown()

# move total data to csv
if verbose: print('saving trial results')
if verbose:
print('Saving trial results')
data_path = os.path.join(path, runner.simulation_name + '-data.csv')
data.to_csv(data_path)

@@ -243,5 +244,5 @@ def _run_simulation(
path, 'checkpoint-{}.json'.format(serialized_timestamp))
checkpoint.persist_json(fcheckpoint)

print('Finished')
print('Finished running simulation')
return checkpoint
2 changes: 1 addition & 1 deletion phoss/ray_runner.py
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ def run(self):
'object_timeout_milliseconds': 9000000})


print('passing path: ', self.gen_sim_path)
print('Passing path:', self.gen_sim_path)
search_config = {
'gen_sim_path': self.gen_sim_path,
'index': tune.grid_search(list(range(self.num_samples))),
8 changes: 4 additions & 4 deletions phoss/schedulers.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ def get_instance(self):
)

elif self.scheduler_name == 'Hyperband':
print('using Hyperband')
print('Using Hyperband')
max_num_epochs = self.scheduler_config.get('max_t', 100)
reduction_factor = self.scheduler_config.get('reduction_factor', 4)

@@ -43,7 +43,7 @@ def get_instance(self):
)

elif self.scheduler_name == 'Median':
print('using Median Rule')
print('Using Median Rule')
max_num_epochs = self.scheduler_config.get('max_t', 100)
return MedianStoppingRule(
time_attr= 'training_iterations',
@@ -52,7 +52,7 @@ def get_instance(self):
)

elif self.scheduler_name == 'PBT':
print('using Population-based Training')
print('Using Population-based Training')
max_num_epochs = self.scheduler_config.get('max_t', 100)
num_samples = self.scheduler_config.get('num_samples', 100)
return PopulationBasedTraining(
@@ -65,5 +65,5 @@ def get_instance(self):
},
)

print('running Random Configurations')
print('Using random configurations with FIFO scheduler')
return FIFOScheduler()
4 changes: 2 additions & 2 deletions phoss/trainables.py
Original file line number Diff line number Diff line change
@@ -72,11 +72,11 @@ def save_checkpoint(self, checkpoint_dir: str) -> None:
No Model to checkpoint
"""
if self.verbose:
print('Virutal Save: ', checkpoint_dir)
print('Virtual Save:', checkpoint_dir)

def load_checkpoint(self, checkpoint: str) -> None:
"""
No Models to load
"""
if self.verbose:
print('Virutal Load: ', checkpoint)
print('Virtual Load:', checkpoint)
582 changes: 0 additions & 582 deletions tune_analysis.ipynb

This file was deleted.

0 comments on commit 5f5b247

Please sign in to comment.