Documentation ¶
Index ¶
- func RunAutoMigrate(db *gorm.DB) error
- type Storage
- func (s *Storage) CloneTrial(studyID int, baseTrial goptuna.FrozenTrial) (int, error)
- func (s *Storage) CreateNewStudy(name string) (int, error)
- func (s *Storage) CreateNewTrial(studyID int) (int, error)
- func (s *Storage) DB() (*sql.DB, error)
- func (s *Storage) DeleteStudy(studyID int) error
- func (s *Storage) GetAllStudySummaries() ([]goptuna.StudySummary, error)
- func (s *Storage) GetAllTrials(studyID int) ([]goptuna.FrozenTrial, error)
- func (s *Storage) GetBestTrial(studyID int) (goptuna.FrozenTrial, error)
- func (s *Storage) GetStudyDirection(studyID int) (goptuna.StudyDirection, error)
- func (s *Storage) GetStudyIDFromName(name string) (int, error)
- func (s *Storage) GetStudyIDFromTrialID(trialID int) (int, error)
- func (s *Storage) GetStudyNameFromID(studyID int) (string, error)
- func (s *Storage) GetStudySystemAttrs(studyID int) (map[string]string, error)
- func (s *Storage) GetStudyUserAttrs(studyID int) (map[string]string, error)
- func (s *Storage) GetTrial(trialID int) (goptuna.FrozenTrial, error)
- func (s *Storage) GetTrialNumberFromID(trialID int) (int, error)
- func (s *Storage) GetTrialParam(trialID int, paramName string) (float64, error)
- func (s *Storage) GetTrialParams(trialID int) (map[string]interface{}, error)
- func (s *Storage) GetTrialSystemAttrs(trialID int) (map[string]string, error)
- func (s *Storage) GetTrialUserAttrs(trialID int) (map[string]string, error)
- func (s *Storage) SetStudyDirection(studyID int, direction goptuna.StudyDirection) error
- func (s *Storage) SetStudySystemAttr(studyID int, key string, value string) error
- func (s *Storage) SetStudyUserAttr(studyID int, key string, value string) error
- func (s *Storage) SetTrialIntermediateValue(trialID int, step int, value float64) error
- func (s *Storage) SetTrialParam(trialID int, paramName string, paramValueInternal float64, ...) error
- func (s *Storage) SetTrialState(trialID int, state goptuna.TrialState) error
- func (s *Storage) SetTrialSystemAttr(trialID int, key string, value string) error
- func (s *Storage) SetTrialUserAttr(trialID int, key string, value string) error
- func (s *Storage) SetTrialValue(trialID int, value float64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAutoMigrate ¶
RunAutoMigrate runs Auto-Migration. This will ONLY create tables, missing columns and missing indexes, and WON’T change existing column’s type or delete unused columns to protect your data.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage stores data in your relational databases.
func (*Storage) CloneTrial ¶
CloneTrial creates new Trial from the given base Trial.
func (*Storage) CreateNewStudy ¶
CreateNewStudy creates study and returns studyID.
func (*Storage) CreateNewTrial ¶
CreateNewTrial creates trial and returns trialID.
func (*Storage) DeleteStudy ¶
DeleteNewStudy creates study and returns studyID.
func (*Storage) GetAllStudySummaries ¶
func (s *Storage) GetAllStudySummaries() ([]goptuna.StudySummary, error)
GetAllStudySummaries returns all study summaries.
func (*Storage) GetAllTrials ¶
func (s *Storage) GetAllTrials(studyID int) ([]goptuna.FrozenTrial, error)
GetAllTrials returns the all trials.
func (*Storage) GetBestTrial ¶
func (s *Storage) GetBestTrial(studyID int) (goptuna.FrozenTrial, error)
GetBestTrial returns the best trial.
func (*Storage) GetStudyDirection ¶
func (s *Storage) GetStudyDirection(studyID int) (goptuna.StudyDirection, error)
GetStudyDirection returns study direction of the objective.
func (*Storage) GetStudyIDFromName ¶
GetStudyIDFromName return the study id from study name.
func (*Storage) GetStudyIDFromTrialID ¶
GetStudyIDFromTrialID return the study id from trial id.
func (*Storage) GetStudyNameFromID ¶
GetStudyNameFromID return the study name from study id.
func (*Storage) GetStudySystemAttrs ¶
GetStudySystemAttrs to restore the attributes for the system.
func (*Storage) GetStudyUserAttrs ¶
GetStudyUserAttrs to restore the attributes for the user.
func (*Storage) GetTrial ¶
func (s *Storage) GetTrial(trialID int) (goptuna.FrozenTrial, error)
GetTrial returns Trial.
func (*Storage) GetTrialNumberFromID ¶
GetTrialNumberFromID returns the trial's number.
func (*Storage) GetTrialParam ¶
GetTrialParam returns the internal parameter of the trial
func (*Storage) GetTrialParams ¶
GetTrialParams returns the external parameters in the trial
func (*Storage) GetTrialSystemAttrs ¶
GetTrialSystemAttrs to restore the attributes for the system.
func (*Storage) GetTrialUserAttrs ¶
GetTrialUserAttrs to restore the attributes for the user.
func (*Storage) SetStudyDirection ¶
func (s *Storage) SetStudyDirection(studyID int, direction goptuna.StudyDirection) error
SetStudyDirection sets study direction of the objective.
func (*Storage) SetStudySystemAttr ¶
SetStudySystemAttr to store the value for the system.
func (*Storage) SetStudyUserAttr ¶
SetStudyUserAttr to store the value for the user.
func (*Storage) SetTrialIntermediateValue ¶
SetTrialIntermediateValue sets the intermediate value of trial. While sets the intermediate value, trial.value is also updated.
func (*Storage) SetTrialParam ¶
func (s *Storage) SetTrialParam( trialID int, paramName string, paramValueInternal float64, distribution interface{}, ) error
SetTrialParam sets the sampled parameters of trial.
func (*Storage) SetTrialState ¶
func (s *Storage) SetTrialState(trialID int, state goptuna.TrialState) error
SetTrialState sets the state of trial.
func (*Storage) SetTrialSystemAttr ¶
SetTrialSystemAttr to store the value for the system.
func (*Storage) SetTrialUserAttr ¶
SetTrialUserAttr to store the value for the user.