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

fixed a bug in get_pandas_dataframe() and added get_sorted_runs_dataframe() #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

2533245542
Copy link

It looks like there is a lot of changes in the pull request but most of them are just deleting blanks (somehow my editor automatically did it for me).

The actual changes happen at line 524 and line 509.

At line 524, .copy() is added to ensure that each config is unique and will not be modified in the loop later.

This is necessary because a config_id can be shared by multiple runs, if a hyperparameter value combination survives all the way from the lowest to the highest budget. We need to do the copy to avoid modifying configs that have the same id but using different budgets.

Currently, a part of the content in all_configs can look like this

 {'hyperparameter': 1.8673196127170794e-05, 'budget': 243.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 243.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 243.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 243.0}]

but instead, it should be

 {'hyperparameter': 1.8673196127170794e-05, 'budget': 9.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 27.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 81.0},
 {'hyperparameter': 1.8673196127170794e-05, 'budget': 243.0}]

At line 524, I added the function:

	def get_sorted_runs_dataframe(self):
		'''
                 Turns the results of self.get_all_runs() to dataframe to make it more user-friendly.
                 The dataframe is sorted by loss and budgets (epochs) to make the hyper-parameter value combination with the
                 smallest loss and budget appear on the top.

                Output:
                A dataframe where the rows are runs. The first few columns are run_id, budget, and loss. The rest of the columns
                are hyperparameters, each with a column.
               '''

Let me know if these are valid changes.

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.

None yet

1 participant