dashboard

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Dashboard

Running dashboard

Pre-built JavaScript files are embedded using go:embed. So it's ok you just run goptuna dashboard command like this:

$ go build cmd/main.go -o goptuna
$ ./goptuna dashboard --storage sqlite:///example.db --host 127.0.0.1 --port 8000
more command line options
$ ./bin/goptuna --help
A command line interface for Goptuna

Usage:
  goptuna [command]

Available Commands:
  create-study Create a study in your relational database storage.
  dashboard    Launch web dashboard
  delete-study Delete a study in your relational database storage.
  help         Help about any command

Flags:
  -h, --help      help for goptuna
      --version   version for goptuna

Use "goptuna [command] --help" for more information about a command.

How to compile TypeScript files

Compiling TypeScript files manually

Node.js v20 is required to compile TypeScript files.

$ npm install
$ npm run build:dev
Watch for files changes
$ npm run watch
Production builds
$ npm run build:prd

Running Dashboard server for reloading

Please pass -tags=develop the custom build tag to return JS files inside local directory (not embedded files). This is useful while devleopment.

$ go run -tags=develop cmd/main.go dashboard --storage sqlite:///db.sqlite3
Started to serve at http://127.0.0.1:8000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(s goptuna.Storage) (http.Handler, error)

Types

type Attribute

type Attribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type FrozenTrial

type FrozenTrial struct {
	ID                 int                 `json:"trial_id"`
	StudyID            int                 `json:"study_id"`
	Number             int                 `json:"number"`
	State              string              `json:"state"`
	Value              float64             `json:"value"`
	IntermediateValues []IntermediateValue `json:"intermediate_values"`
	DatetimeStart      string              `json:"datetime_start,omitempty"`
	DatetimeComplete   string              `json:"datetime_complete,omitempty"`
	Params             []TrialParam        `json:"params"`
	FixedParams        []TrialFixedParam   `json:"fixed_params"`
	UserAttrs          []Attribute         `json:"user_attrs"`
}

type IntermediateValue

type IntermediateValue struct {
	Step  int     `json:"step"`
	Value float64 `json:"value"`
}

type StudySummary

type StudySummary struct {
	ID            int         `json:"study_id"`
	Name          string      `json:"study_name"`
	Direction     string      `json:"direction"`
	BestTrial     FrozenTrial `json:"best_trial"`
	UserAttrs     []Attribute `json:"user_attrs"`
	SystemAttrs   []Attribute `json:"system_attrs"`
	DatetimeStart string      `json:"datetime_start,omitempty"`
}

StudySummary holds basic attributes and aggregated results of Study.

type TrialFixedParam added in v0.9.0

type TrialFixedParam struct {
	Name               string `json:"name"`
	ParamExternalValue string `json:"param_external_value"`
}

type TrialParam

type TrialParam struct {
	Name               string  `json:"name"`
	ParamInternalValue float64 `json:"param_internal_value"`
	ParamExternalValue string  `json:"param_external_value"`
	ParamExternalType  string  `json:"param_external_type"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL