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

Sherpa Dashboard Links Invalid #92

Open
kjmayer opened this issue Mar 26, 2020 · 1 comment
Open

Sherpa Dashboard Links Invalid #92

kjmayer opened this issue Mar 26, 2020 · 1 comment

Comments

@kjmayer
Copy link

kjmayer commented Mar 26, 2020

Hi,

When I run my code, the links provided to access the dashboard are invalid. I tried using the key disable_dashboard = True in sherpa.Study and then after running all my code, sherpa.Study.load_dashboard(".") to load the dashboard, but those links do not work either.

Here is the code:

parameters = [sherpa.Continuous(name='lr', range=[0.005, 0.1], scale='log'),
              sherpa.Continuous(name='dropout', range=[0., 0.4]),
              sherpa.Ordinal(name='batch_size', range=[16, 32, 64, 256, 512, 1024]),
              sherpa.Discrete(name='num_hidden_units', range=[1, 300]),
              sherpa.Choice(name='activation', range=['sigmoid', 'relu'])]
algorithm = sherpa.algorithms.RandomSearch(max_num_trials=10)
study = sherpa.Study(parameters=parameters,
                 algorithm=algorithm, disable_dashboard=False,
                 lower_is_better=False)

for trial in study:
    model = Sequential()
    model.add(Dense(units=trial.parameters['num_hidden_units'], activation=trial.parameters['activation'], input_dim=np.shape(Xin)[1]))
    model.add(Dense(np.shape(Yout)[1], activation='softmax'))
    model.compile(loss='binary_crossentropy', optimizer=optimizers.Adam(trial.parameters['lr']), metrics=['accuracy'])
   
    model.fit(x_train, y_train, epochs=5, batch_size=trial.parameters['batch_size'])
    
    loss,acc = model.evaluate(x_test,y_test)

    study.add_observation(trial=trial, objective=acc, context={'loss':loss})

    if study.should_trial_stop(trial):
      break

    study.finalize(trial)

study.save(".")
@LarsHH
Copy link
Collaborator

LarsHH commented Apr 27, 2020

Hi @kjmayer ,

Mind if I ask what operating system you run on? If you're running this on your laptop/desktop (that is, you're not ssh'ed into a machine to run this), can you try to take one of the addresses Sherpa is giving you and then just type into your browser localhost:<port> or http://127.0.0.1:<port> where <port> is the port (the number after the colon) in the address that sherpa is giving you.

Let me know whether this helps at all.

Best,
Lars

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

2 participants