Document exceptions
See original GitHub issueExceptions that are part of public APIs could be documented using the Raises:
syntax of Sphinx. For reference, some methods of the BaseStorage
are documented this way.
I believe this could be a tracking issue until we’ve covered a decent proportion of the public APIs where one could just leave a note when addressing some particular file/class/submodule/etc.
Edit: 2022-02-25 Obsolete list. Issue paused until updated.
{{Crissman edit – changed to lower list generated by @keisuke-umezawa to keep one list for management.}}
- ./optuna/visualization/_pareto_front.py:plot_pareto_front:22: DAR401: -r ValueError
- ./optuna/storages/_base.py:create_new_study:96: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:delete_study:117: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_study_user_attr:131: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_study_system_attr:151: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_study_directions:171: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_id_from_name:194: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_id_from_trial_id:211: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_name_from_id:228: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_directions:245: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_user_attrs:262: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_study_system_attrs:279: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_all_study_summaries:296: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:create_new_trial:308: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_state:330: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_param:360: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_trial_id_from_study_id_trial_number:381: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_trial_number_from_id:401: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_trial_param:422: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_values:442: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_intermediate_value:463: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_user_attr:486: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:set_trial_system_attr:508: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_trial:532: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_all_trials:553: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:get_best_trial:598: DAR401: -r RuntimeError
- ./optuna/storages/_base.py:get_best_trial:598: DAR401: -r ValueError
- ./optuna/storages/_base.py:read_trials_from_remote_storage:687: DAR401: -r NotImplementedError
- ./optuna/storages/_base.py:check_trial_is_updatable:704: DAR401: -r RuntimeError
- ./optuna/storages/_rdb/storage.py:_create_new_trial:481: DAR401: -r OperationalError
- ./optuna/storages/_rdb/storage.py:_update_trial:612: DAR401: -r RuntimeError
- ./optuna/pruners/_base.py:prune:11: DAR401: -r NotImplementedError
- ./optuna/trial/_trial.py:suggest_float:74: DAR401: -r ValueError
- ./optuna/trial/_trial.py:suggest_int:354: DAR401: -r ValueError
- ./optuna/trial/_trial.py:report:507: DAR401: -r NotImplementedError
- ./optuna/trial/_trial.py:report:507: DAR401: -r TypeError
- ./optuna/trial/_trial.py:report:507: DAR401: -r ValueError
- ./optuna/trial/_trial.py:should_prune:596: DAR401: -r NotImplementedError
- ./optuna/integration/_lightgbm_tuner/optimize.py:get_best_booster:473: DAR401: -r ValueError
- ./optuna/integration/_lightgbm_tuner/optimize.py:best_trial:702: DAR401: -r ValueError
- ./optuna/integration/_lightgbm_tuner/optimize.py:get_best_booster:1021: DAR401: -r ValueError
- ./optuna/integration/botorch.py:qei_candidates_func:54: DAR401: -r ValueError
- ./optuna/importance/_base.py:evaluate:23: DAR401: -r NotImplementedError
- ./optuna/importance/init.py:get_param_importances:22: DAR401: -r TypeError
- ./optuna/_imports.py:check:76: DAR401: -r ImportError
- ./optuna/distributions.py:single:50: DAR401: -r NotImplementedError
- ./optuna/distributions.py:_contains:61: DAR401: -r NotImplementedError
- ./optuna/multi_objective/visualization/_pareto_front.py:plot_pareto_front:26: DAR401: -r ValueError
- ./optuna/multi_objective/trial.py:report:109: DAR401: -r ValueError
- ./optuna/multi_objective/samplers/_base.py:infer_relative_search_space:25: DAR401: -r NotImplementedError
- ./optuna/multi_objective/samplers/_base.py:sample_relative:58: DAR401: -r NotImplementedError
- ./optuna/multi_objective/samplers/_base.py:sample_independent:88: DAR401: -r NotImplementedError
- ./optuna/multi_objective/study.py:create_study:51: DAR401: -r TypeError
- ./optuna/multi_objective/study.py:create_study:51: DAR401: -r ValueError
- ./optuna/samplers/_base.py:infer_relative_search_space:48: DAR401: -r NotImplementedError
- ./optuna/samplers/_base.py:sample_relative:76: DAR401: -r NotImplementedError
- ./optuna/samplers/_base.py:sample_independent:112: DAR401: -r NotImplementedError
- ./optuna/samplers/_nsga2.py:_constrained_dominates:401: DAR401: -r ValueError
- ./optuna/study.py:best_trial:80: DAR401: -r RuntimeError
- ./optuna/study.py:direction:115: DAR401: -r RuntimeError
- ./optuna/study.py:tell:428: DAR401: -r Exception
- ./optuna/study.py:create_study:955: DAR401: -r ValueError
- ./optuna/study.py:create_study:955: DAR401: -r exceptions.DuplicatedStudyError
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Exception Documents Definition: 240 Samples | Law Insider
Exception Documents means true, correct and legible copies of each document listed as an exception to title in the Title Commitment.
Read more >How to document thrown exceptions in c#/.net - Stack Overflow
You should document every exception that might be thrown by your code, including those in any methods that you might call.
Read more >What is an Exception? Document Management Terms for ...
Many banking exceptions fall into four categories: Incomplete information; Insufficient data; Expiring documents; Required actions. Each exception category is ...
Read more >But We Need Exceptions! How to Include Procedure ...
How to include procedure exceptions in your written business documents. You can include exception in your documents, it just takes a little advance ......
Read more >Manual :: Documenting Exceptions
Exceptions should be documented using the @throws phpdoc keyword: ... your method should also document which exceptions it is not catching.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After discussions with @himkt and @toshihikoyanase , we decided to reiterate on this list. Concretely, and likely although not yet fully discussed, slim down the public API with regard to exceptions. Until then, we’d like to pause this issue. I’ll reflect this conclusion in the top description.
I moved @keisuke-umezawa’s list to the top slot so we have one list to manage from.
Also marked the completed ones as finished. Found the list of files that have
:exc:
lines by extending @keisuke-umezawa’s command as follows: