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.

Reorganize storages API and make BaseStorage public

See original GitHub issue

blocked by #2938

Motivation

Currently, BaseStorage is private to users, and it is not expected that users will inherit BaseStorage and implement new storage classes. Also, even if you actually try to implement it, there are many methods that must be implemented, and the requirements that each method must satisfy are unclear. So, there are high hurdles for general users to implement them. By reorganizing the storages API, we want to reduce the number of methods that must be implemented and clarify the requirements that each method must satisfy. After that, I want to make BaseStorage public if necessary.

Description

The storage API will be reorganized from the following viewpoints.

  • Reduce the number of methods that must be implemented
  • Clarify the requirements that each method must satisfy

After that, considering the pros / cons of making BaseStorage public, and if pros is stronger, make it public.

TODOs

  • Redesine storages API to reduce their methods
  • Reduce the number of methods that must be implemented
  • Clarify the requirements that each method must satisfy
  • Make BaseStorage public if needed

Details actions

Redesine storages API to reduce their methods

The following methods can be removed from the APIs:

Reduce the number of methods that must be implemented

get_trial_xxx

We can provide the default implementation in BaseStorage using get_trial. c.f. https://github.com/optuna/optuna/pull/2994

set_trial_xxx

Need discussion

get_study_xxx

Need discussion

set_study_xxx

Need discussion

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
keisuke-umezawacommented, Mar 26, 2022

The committers concluded that we need to do fundamental changes to the storages API before making it public. e.g.

  • Currently, the storages have two responsibility, one is for CRUD operations and the other is for transaction management. It might be divided into two layers.
  • The storages have optional features such as cache and heartbeat. They might be separated from mandatory storages APIs.

Those are examples we need to find solutions before making it public, and we estimated that it would be difficult to complete it by v3 release. So, we will postpone it later.

1reaction
masapcommented, Feb 19, 2022

I think we should merge set_trial_state and set_trial_values.

@not522 I could reproduce the issue with some delay and fixed the issue with #3323. Does this fit with your idea?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add-ons, Storage, & API Integration FAQ's - OSF Support
If parts of the project could be made public, organize the project with components to manage access to contents. See an example here....
Read more >
Announcing Optuna 3.0 (Part 2) - Medium
Reorganize storages API and make BaseStorage public. The optuna.storage module is responsible for storing the history of optimizations.
Read more >
What is Cloud Storage? - Cloud Storage - AWS
You can organize and manage your data in ways that support specific use cases, create cost efficiencies, enforce security, and meet compliance requirements....
Read more >
Public access prevention | Cloud Storage
When you enforce public access prevention, no one can make data in applicable buckets public through IAM policies or ACLs. There are two...
Read more >
File storage API - Django documentation
The FileSystemStorage class implements basic file storage on a local filesystem. It inherits from Storage and provides implementations for all the public ......
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