Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    James Y
    @yuanjames
    Does CMASE sampler change? Previously I can see the startup_trials in study.trials_dataframe. However, now I did not see it
    ochipara
    @ochipara
    I have a question about what is the best practice for optuna. When you're running a trial should you return the last value that you find or the best value? For example, if you're searching for hyperparams that maximize accuracy, should you return the last value of the accuracy or the best? Any suggestions would be welcomed ...
    UntotaufUrlaub
    @UntotaufUrlaub
    Hi folks, currently just doing my first optuna project. One question: How can you test one set of hyperparamters for multiple initialisations? I tried performing multiple runs per trial, and each run should still be subject to pruning, but I couldnt report multiple runs. What is a suiting approach?
    UntotaufUrlaub
    @UntotaufUrlaub
    @ochipara Oh, I just recognized that this forum seems quite dead / inactive, so here are my 5 cents about your question also I have not much experience XD I would go for the best value, as long as you also store / return the best model with it. Just make sure that you are certain that it is the best one by performing enough validation.
    Gustavo Hylander
    @ghylander
    Hi, i have a question about setting up optuna. Can I point to a remotely stored SQL database? Both in optuna and optuna dashboard? I use a AWS machine for the training, and having it online costs money. My idea is to have the machine with optuna send the data to a SQL server, then use dashboard on my laptop, mounting the http server in the localhost and pointing to the remote SQL server. Is this achievable?
    Gustavo Hylander
    @ghylander
    I asked in the discussion area of optuna-dashboard and got an affirmative answer, just FYI if anyone was interested
    Spren
    @BasLaa
    image.png
    I have been trying to install optuna for contributing these last two days, and I cannot get around this error:
    The following error occurred while trying to add or remove files in the
    installation directory:
        [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-12196.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\
    I have changed all my permissions so that any user or administrator can read and write files, but the error still remains. Anyone have an idea?
    Hideaki Imamura
    @HideakiImamura

    We’ve just released the second alpha version of 3.0.0 with new features including a new sampler and lots of overall improvements. Again, early adopters may want to upgrade and are more than welcome to provide feedback.

    🆕Quasi-Monte Carlo sampler
    📈Improvements to visualizations
    🔨Ongoing refactoring of core modules

    Check out the highlights and release notes at
    https://github.com/optuna/optuna/releases/tag/v3.0.0-a1 or with the Tweet https://twitter.com/OptunaAutoML/status/1490581940419719173.

    Toshihiko Yanase
    @toshihikoyanase
    :tada:
    James Y
    @yuanjames
    Hi, I would like to ask whether the pruned trial would be used to update optimization algorithm?
    3 replies
    Shoubhik Maiti
    @shoubhikraj

    Hi, I am using optuna for a cheminformatics project, however, I have no software background. Any help is greatly appreciated.

    I have a loop that evaluates the best hyperparameter set for a particular type of input data:

    param_list = []
    for fprint in fprint_type:
        X_train = get_fingerprint(fprint,data)
        wrapper_func = lambda trial : get_model(trial, X_train, y_train)
        study = optuna.create_study()
        study.optimize(wrapper_func,n_trials=60)
        param_list.append(study.best_params)

    Does creating a study keep that study in memory for some time? Do I need to call delete_study() to remove the previously created study? Is there a possibility of running out of memory here?

    Hideaki Imamura
    @HideakiImamura

    Optuna v3.0.0-a2 patch just released.

    It includes a small fix that the same warning message was emitted more than once when calling Study.optimize. Please consider upgrading if you are using v3.0.0-a1.
    Release note: https://github.com/optuna/optuna/releases/tag/v3.0.0-a2
    Tweet: https://twitter.com/OptunaAutoML/status/1493083663214718980?s=20&t=wPertHqeosdjSP96V4Lveg

    pip install optuna==3.0.0a2

    Patshin_Anton
    @paantya
    Hi all!
    Can you please tell me if it is possible to somehow use optuna in C++ code? or maybe you know other optimizers that can be run in c++?
    himkt
    @himkt
    You can use Optuna in other programming language by utilizing Optuna CLI interface.
    example: https://github.com/not522/optuna-cpp
    2 replies
    James Y
    @yuanjames
    Hi, does anyone has the idea to implement a user-defined pruner? The pruner need to consider a fixed number of trials to judge which should be pruned.
    7 replies
    James Y
    @yuanjames
    For example, if I have ten trials, each trial is only assigned with 10 epochs to train NNs at first and observe their performance to select 4 of 10 to continue training.
    seabasss
    @seabasss:matrix.org
    [m]
    Hi all, I'm trying to load a previously pickled optuna study but I'm getting a "* ModuleNotFoundError: No module named 'optuna.study.study'; 'optuna.study' is not a package" error... any ideas or suggestions? Thanks
    himkt
    @himkt
    python -c 'import optuna.study.study'

    Does this work on your environment? I suspect you created a file optuna.py on your current directory.

    And, we strongly recommend to use optuna's storage to save/load a study instead of using pickle.
    optuna/optuna#3243

    3 replies
    RAnastacioo
    @RAnastacioo
    Hello, it is possible to use optuna to search for a model, with a well-defined RAM and ROM memory objective. Through some callback maybe
    Willytell
    @Guiller26365772_twitter
    Hi all, for the NSGA-II sampler, I can't figure out the impact of "population_size" of this multi-objective algorithm. I've read the paper in which it is base on (according the Optuna's documentation), but still can't understand the "population_size" and which is the stop number of generations. Any help on this would be extremely great!
    1 reply
    Scott Tarlow
    @scotttarlow
    hi all - i am tuning a neural network written in pytorch using optuna. when i pass n_jobs=1 to optuna, the model runs fine, but when I have n_jobs > 1 I get the following error: RuntimeError('one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [512, 512]], which is output 0 of AsStridedBackward0, is at version 3; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).')
    I have no idea why this is happening
    Jason Liang
    @jasonzliang
    Hi, I have a quick question: for study.optimize, how do I get it to switch to use python multiprocessing instead of multithreading? Thanks.
    1 reply
    Saad Khan
    @khansaad
    Hi,
    I have a question regarding the recommendations which optuna provides. Is it possible to get the list of all recommendations, say, from first n trials ?
    Divyanshu
    @divyanshutwt_twitter
    Hi, Can anyone please suggest any Good First Issues get started with a contribution?
    himkt
    @himkt
    Thank you for your interest in Optuna. :smile_cat: There are several issues labeled "good first issue" or "contribution-welcome" for the first time contributors. For example, adding the reference to the tutorial Re-use the best values of optuna/optuna#2940 is seemingly easy to start. This needs to read our API documentation and find a good place to put the reference. The existing PRs helps to understand how to work on.
    1 reply
    Divyanshu
    @divyanshutwt_twitter
    Raised a PR that partially fixes optuna/optuna#2940 Can anyone please review it?
    Divyanshu
    @divyanshutwt_twitter
    I was wondering, do we have any weekly/bi-weekly calls dev calls?
    1 reply
    Scott Tarlow
    @scotttarlow

    hi all - i am tuning a neural network written in pytorch using optuna. when i pass n_jobs=1 to optuna, the model runs fine, but when I have n_jobs > 1 I get the following error: RuntimeError('one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [512, 512]], which is output 0 of AsStridedBackward0, is at version 3; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).')

    btw i figured this out - it had do do with how I instantiated the model - my optuna objective is an object and the model was built in the constructor instead of the call function, so every time optuna spawned a new process it was training a pytorch model it was referencing the original one when the optuna objective was constructed instead of building a new model

    1 reply
    frustrating small error that helps you learn how to build high performance / scalable systems in the end
    haha
    colpark
    @colpark
    Hi all, I wonder if I can resume a trial (not a study) which is not completed because the job time is over (interrupted by the job scheduler, such as slurm)? Resuming a study is quite straight-forward, but resuming a trial which is not completed does not seem so.
    himkt
    @himkt
    If you want to resume a trial that is killed unexpectedly, heartbeat mechanism and RetryFailedCallback can be used, I think. Note that it is not available in ask-and-tell interface and you need to create another trial whose parameters are the same as a failed trial using enqueue_trial.
    1 reply
    Alessandro Zavoli
    @AlessandroZavoli
    what algorithms are used for multi-objective optimization? Is a rule-of-thumb available for selecting the number of trials in that case?
    Divyanshu
    @divyanshutwt_twitter
    I wanna understand the storage facilities and their issues. If anyone can help me understand this I will be grateful. As I'm thinking to work on optuna/optuna#3328
    Ishan Shanware
    @kernelpanic77
    Hello @channel!
    I am interested in the Project: The Next Generation of Hyperparameter Optimization Software, for the upcoming GSOC in summer'22. I was hoping to have a discussion for the same. (Hoping that I am not very late and there are too many candidates already..... :disappointed: )
    About me:
    I am Ishan. I am currently doing my undergrad in Computer Science from IIIT Bangalore, India. My research interests are in Machine Learning and Distributed Systems. I am currently trying to explore the domain of conputer vision especially it's applications in computer vision.
    I am familiar with Pytorch and enjoy competing in kaggle competitions in my spare time. Linear algebra and calculus are two subjects in which I am proficient.
    I was hoping to get some guidance here.
    3 replies
    contramundum53
    @contramundum53

    We’ve just released the first beta version of 3.0.0 with simplified distribution classes and lots of overall improvements. Majority of v3 items including many quality of life improvements have been included. Update to get a feel for the next major version.

    🔨Consistent Ask-and-Tell with Study.optimize
    ✅Simplified search space definitions

    Check out the highlights and release notes at
    https://github.com/optuna/optuna/releases/tag/v3.0.0-b0 or with the Tweet https://twitter.com/OptunaAutoML/status/1513733664601178113.

    Saad Khan
    @khansaad

    Hello,
    Can anyone help me with getting current best recommendation while the experiment is running ?
    Say, I have to run it for 10 trials and on 5th trial I need the best one. Is it possible to get it?
    Do I need to save each result in some CSV/DB and then read it from there, if yes, what's the best way to do that ?

    Thanks

    himkt
    @himkt
    How about using Optuna CLI? optuna best-trial
    https://optuna.readthedocs.io/en/stable/reference/cli.html#best-trial
    12 replies
    Saad Khan
    @khansaad
    hi,
    I need to run simultaneous multiple experiments in my project in a multi-threaded environment. Does optuna allows parallel studies ?
    I saw this post for easy parallelization to run multiple trials using RDB but can we run multiple parallel studies each having different number of trials ?
    8 replies
    daramolloy
    @daramolloy
    Hi everyone, within my trial function I have a function that uses the python multiprocessing library and Optuna seems to limit the number of process that I can have active to just one which is slowing my optimisation time massively. Is this something I can turn off? I have run the function with and without Optuna and timed it to make sure that is the issue.
    1 reply
    Knut VÃ¥gnes Eriksen
    @knuteriksen
    Hi everyone! I have a question about combining the TPE sampler with a pruner. Will the results of a pruned trial be excluded in KDE? I assume this is true, but I have not been able to confirm it from the documentation.
    Ethan Tenison
    @ethantenison

    Hello Optuna World,

    Is there a way to set the seed for the optimize function? I need my results to be replicable, but at the moment each time I create a study and optimize I get slightly different results.

    2 replies
    tandy
    @tandy1000:matrix.org
    [m]
    hey, i was wondering is it possible to use optuna on google colab?
    3 replies
    tandy
    @tandy1000:matrix.org
    [m]
    silly me
    Miguel Crispim Romao
    @romanovzky
    Hi everyone! I have a quick implementation question, what are the crossover and mutation prescriptions in the NSGA-II algorithm?
    liron
    @lironsunbit
    Hi everyone, what happens if I use TPE sampler for multi-objective optimization? Is it being used or other sampler?
    Divyanshu
    @divyanshutwt_twitter

    Hello @HideakiImamura, @nzw0301

    Earlier, I applied for GSoC this year and the result was kind of disheartening. Anyway, I will be grateful. If you guys can give some feedback on my application.

    P.S: Right now I'm busy my end semesters and I'll resume contributing as soon as I'm done with my end sems.