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

Lookup index for the trained models #22

Open
colehurwitz opened this issue Jan 24, 2020 · 2 comments
Open

Lookup index for the trained models #22

colehurwitz opened this issue Jan 24, 2020 · 2 comments

Comments

@colehurwitz
Copy link

colehurwitz commented Jan 24, 2020

Does a lookup index exist for the 10'800 pretrained disentanglement_lib modules? I wanted to quickly reproduce specific experiments (e.g. btcvae, beta=4, dsprites), but I am not sure how to find that pretrained model.

Thanks!

@ryx19th
Copy link

ryx19th commented Jun 3, 2020

I have an observation: take the last group of experiments on 3dshapes as an example, there are 1800 in total (10800~12599). As mentioned in the paper, they evaluated 6 methods, with 6 regularization strengths (i.e., hyperparameter values) each. And they also tried 50 different random
seeds. So there have been 6650=1800. I guess this should be the overall layout.

As for the specific configurations, you may run some first and get the printed config as anchors, and calculate the index of your desired one.
(Or actually you can just modify the code to quit right after printing the config and then traverse all experiements in minutes to get the full list)

@bonheml
Copy link

bonheml commented Jan 14, 2021

This is a late answer but I think it may be useful for other people looking for this kind of feature.
You can get the list of model configurations using the get_config function in the sweep.py files of each study.
Now, from this, you can create a dataframe to search the configs more easily.

For example for unsupervised_study_v1:

from disentanglement_lib.config.unsupervised_study_v1.sweep import get_config
import pandas as pd

configs = get_config()
print(configs[12])  # give the config of model 12

df = pd.dataFrame(configs)

# Get the beta_tc_vae models using dsprites and a beta param of 4.
model = df['model.name'] == "beta_tc_vae"
dataset = df['dataset.name'] == "dsprites_full"
beta = df["beta_tc_vae.beta"] == 4.0

# Give all the possible model configs unused parameters excluded (e.g., annealed_vae.gamma)
print(df[model & dataset & beta].dropna(axis=1))

# Give the list of model ids with this configuration
print(df.index[model & dataset & beta]) 

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

No branches or pull requests

3 participants