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

trial._trial_id or trial._number #45

Open
hoopwoop opened this issue Sep 4, 2024 · 2 comments
Open

trial._trial_id or trial._number #45

hoopwoop opened this issue Sep 4, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request pending Waiting for a response

Comments

@hoopwoop
Copy link

hoopwoop commented Sep 4, 2024

Hi, I'm using the neptune-optuna integration, and I found the numbering in neptuna a bit confusing. Shouldn't the trial._trial_id (counted in the database across studies, which does not start from 0 when initializing a new study) in the _log_single_trial method be replaced with trial._number (counted only in a study, starts from 0 when initializing a new study) ?

def _log_single_trial(run, study: optuna.Study, trial: optuna.trial.FrozenTrial, namespaces, best=False):

@SiddhantSadangi SiddhantSadangi self-assigned this Sep 6, 2024
@SiddhantSadangi SiddhantSadangi added the enhancement New feature or request label Sep 6, 2024
@SiddhantSadangi
Copy link
Member

Hey @hoopwoop 👋

Nice observation! Since most of our users use InMemoryStorage, this never seemed to be an issue as trial IDs would start from 0 for each new study, but I can imagine this not being the case for persistent storage (although I haven't tested it yet).

Are you using persistent storage to store Optuna studies? If so, could you send me a screenshot of what the trials folder looks like in the Neptune run? Feel free to drop a mail to support@neptune.ai if you don't want to share it in public.

I am leaving on a 3-week vacation starting tomorrow, but replacing _trial_id with _number should be pretty straightforward. You can update your local source code for the time being, and I will implement the changes in a new release of neptune-optuna once I am back.

@SiddhantSadangi SiddhantSadangi added the pending Waiting for a response label Sep 6, 2024
@hoopwoop
Copy link
Author

hoopwoop commented Sep 6, 2024

Hi @SiddhantSadangi,

Yes, I'm using a persistent storage, and please see image below.
image

I've solved it by using _number in my code. Would be happy to use that coming update. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending Waiting for a response
Projects
None yet
Development

No branches or pull requests

2 participants