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

Multi parameter/objective in run_vizier.py #232

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Hrancheng
Copy link
Collaborator

This modified run_vizier can run multi parameter and multi objective experiments in my PC
Need to specify config file path python3 run_vizier.py --config explorations/activation_sweep.json

@gkielian
Copy link
Collaborator

Let's add an install script (generally actually for gpu) that includes this : )

@gkielian
Copy link
Collaborator

Please create a new directory called "install_scripts" and add a script there for installing the openvizier requirements : )

@gkielian
Copy link
Collaborator

To support all of the features we need

  • type
  • discrete for floating
  • scaling (log etc)
  • support for ranges

Add a prefix for things compatible with this "vizieR" e.g. "vizier_softmax_sweep.json"
Add to the run_vizier a -c shortcut for config, since config take a long time to type (before I forget about this)
We need to test that if interrupted that it will continue from where it left off.

Handling of infeasible (maybe try catch for nan from the loss, and other types of metrics), and notes from meeting with OpenVizier

run_vizier.py Outdated
study_client = clients.Study.from_study_config(
study_config, owner="owner", study_id="example_study_id"
study_config, owner="owner1", study_id="example_study_id"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we should make these argparse_configurations

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check that resuming for grid search works (with same settings).

Make it grid search doesn't repeat after stopping and restarting. Let us know results (+ or -)

run_vizier.py Outdated
)

def evaluate_trial(loss, PPA, trial):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow we should let the model know if the loss cannot be found or is NaN to mark as infeasible.

run_vizier.py Outdated
study_client = clients.Study.from_study_config(
study_config, owner="owner", study_id="example_study_id"
study_config, owner="owner1", study_id="example_study_id"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check that resuming for grid search works (with same settings).

Make it grid search doesn't repeat after stopping and restarting. Let us know results (+ or -)

run_vizier.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an example script in the tests folder for default settings.

@gkielian
Copy link
Collaborator

gkielian commented Oct 8, 2024

Refactor this into an optimization over validation loss and memory (number of bits)

  • This will take into consideration the quantization

Later we'll do validation loss and PPA:

  • power (if area > max_area will label as 'infeasible')
  • area (if power > max_power will label as 'infeasible')
  • etc.

@gkielian
Copy link
Collaborator

gkielian commented Oct 8, 2024

Please make this into a separate script and restore the original file.

Create a vizier_optimization folder, add this new script there, a readme and a sample bash script that shows how to run it.

@gkielian gkielian changed the title Muti parameter/objective in run_vizier.py Multi parameter/objective in run_vizier.py Oct 8, 2024
# vizier_iterations: determine how many trails to run
# vizier_algorithm: choose which algorithm to use
# objectives: choose which objectives to use, possible choices: ["validation_loss", "num_bits"]
# c: config file, in yaml format
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust this README as per the https://www.makeareadme.com/ guide.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add how to run it including sample commands (use the backticks)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a demo script here

# vizier_iterations: determine how many trails to run
# vizier_algorithm: choose which algorithm to use
# objectives: choose which objectives to use, possible choices: ["validation_loss", "num_bits"]
# c: config file, in yaml format
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add how to run it including sample commands (use the backticks)

@@ -0,0 +1,3 @@
#!/bin/bash
pip install google-vizier[all]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's specify the version to the latest

@@ -0,0 +1,3 @@
#!/bin/bash
pip install google-vizier[all]
pip install torch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's omit this, should already be installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants