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

accordance with pyyaml 5.1 #5

Merged
merged 1 commit into from Mar 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions automl_gs/utils_automl.py
Expand Up @@ -123,7 +123,7 @@ def build_hp_grid(framework, types, num_trials,
"""

with open(hp_path) as f:
hps = yaml.load(f)
hps = yaml.load(f, Loader=yaml.FullLoader)

# Refine hyperparameters by only using ones relevant to
# the data and framework of choice
Expand Down Expand Up @@ -196,7 +196,7 @@ def render_model(params, model_name, framework, env, problem_type,
text_framework = 'tensorflow' if framework == 'tensorflow' else 'sklearn'

with open(metrics_path) as f:
metrics = yaml.load(f)[problem_type]
metrics = yaml.load(f, Loader=yaml.FullLoader)[problem_type]

for file in files:
script = env.get_template('scripts/' + file.replace('.py', '')).render(
Expand Down Expand Up @@ -267,7 +267,7 @@ def get_problem_config(target_data,

# Direction
with open(metrics_path) as f:
metrics = yaml.load(f)
metrics = yaml.load(f, Loader=yaml.FullLoader)

direction = metrics[target_metric]['objective']
direction_text = 'minimizing' if direction == 'min' else 'maximizing'
Expand Down Expand Up @@ -326,4 +326,4 @@ def train_generated_model(cmd, num_epochs, train_folder, pbar_sub):
pbar_sub.last_print_n = 0
pbar_sub.start_t = time()
pbar_sub.last_print_t = time()
pbar_sub.refresh()
pbar_sub.refresh()