question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Suggest API

See original GitHub issue

There is already a function in the Trial class for suggesting a discrete uniformly distributed float (Trial.suggest_discrete_uniform). It would be nice to have the same option that returns integers instead of floats.

My use case is for network representation learning - I want to suggest the embedding dimension in intervals of 50 between 50-350 (e.g. 50, 100, 150, … , 300, 350).\

Currently, I can accomplish this by dividing out my interval then suggesting an integer and multiplying it like:

embeddings_dim = 50 * trial.suggest_int('embeddings_dim', 1, 7)

But this loses the power of tracking the value within optuna. Alternatively I could use the following, but the the data type is tracked incorrectly.

embeddings_dim = int(trial.suggest_discrete_uniform('embeddings_dim', 50, 350, q=7))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:40 (30 by maintainers)

github_iconTop GitHub Comments

4reactions
nzw0301commented, May 2, 2020

@sile Thank you for your reply! I understood.

I’ll create a PR to support log argument of suggest_int since @himkt seems too busy.

2reactions
silecommented, Jun 11, 2020

Through the following PRs, the update of the Suggest API has been completed. All of the features will be available by the next major release (v2.0.0) planned for July. Many thanks to all the contributors involved in this issue! Great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suggest Changes API - GitLab Docs
This page describes the API for suggesting changes. Every API call to suggestions must be authenticated. Applying a suggestion. Applies a suggested patch...
Read more >
Method: query.suggest | Cloud Search - Google Developers
Provides suggestions for autocompleting the query. Note: This API requires a standard end user account to execute. A service account can't perform Query...
Read more >
Suggestions API - Get Suggestions - AddSearch Documentation
You can use search suggestions API endpoint to retrieve search suggestions from the index.
Read more >
suggest—ArcGIS REST APIs
The suggest method is intended to be used by a client application to provide a list of suggested matches as a user enters...
Read more >
UpdateQuerySuggestionsConfig - Amazon Kendra
Updates the settings of query suggestions for an index. Amazon Kendra supports partial updates, so you only need to provide the fields you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found