mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-12 12:40:33 +08:00
Apply formatter
This commit is contained in:
@@ -34,7 +34,15 @@ import {
|
||||
studySummariesLoadingState,
|
||||
} from "./state"
|
||||
import { getDominatedTrials } from "./dominatedTrials"
|
||||
import { Artifact, FeedbackComponentType, Note, StudyDetail, StudyDetails, StudySummary, Trial } from "./types"
|
||||
import {
|
||||
Artifact,
|
||||
FeedbackComponentType,
|
||||
Note,
|
||||
StudyDetail,
|
||||
StudyDetails,
|
||||
StudySummary,
|
||||
Trial,
|
||||
} from "./types"
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const actionCreator = () => {
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
import * as plotly from "plotly.js-dist-min"
|
||||
import axios from "axios"
|
||||
import * as Optuna from "@optuna/types"
|
||||
import { API_ENDPOINT, Artifact, FeedbackComponentType, FormWidgets, Note, ParamImportance, PlotlyGraphObject, PreferenceFeedbackMode, PreferenceHistory, SearchSpaceItem, StudyDetail, StudySummary, Trial, TrialParam } from "./types"
|
||||
import {
|
||||
API_ENDPOINT,
|
||||
Artifact,
|
||||
FeedbackComponentType,
|
||||
FormWidgets,
|
||||
Note,
|
||||
ParamImportance,
|
||||
PlotlyGraphObject,
|
||||
PreferenceFeedbackMode,
|
||||
PreferenceHistory,
|
||||
SearchSpaceItem,
|
||||
StudyDetail,
|
||||
StudySummary,
|
||||
Trial,
|
||||
TrialParam,
|
||||
} from "./types"
|
||||
|
||||
const axiosInstance = axios.create({ baseURL: API_ENDPOINT })
|
||||
|
||||
|
||||
@@ -41,7 +41,10 @@ export const StudyArtifactCards: FC<{ study: StudyDetail }> = ({ study }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box component="div" sx={{ display: "flex", flexWrap: "wrap", p: theme.spacing(1, 0) }}>
|
||||
<Box
|
||||
component="div"
|
||||
sx={{ display: "flex", flexWrap: "wrap", p: theme.spacing(1, 0) }}
|
||||
>
|
||||
{study.artifacts.map((artifact) => {
|
||||
const urlPath = `/artifacts/${study.id}/${artifact.artifact_id}`
|
||||
return (
|
||||
|
||||
@@ -50,7 +50,10 @@ export const TrialArtifactCards: FC<{ trial: Trial }> = ({ trial }) => {
|
||||
>
|
||||
Artifacts
|
||||
</Typography>
|
||||
<Box component="div" sx={{ display: "flex", flexWrap: "wrap", p: theme.spacing(1, 0) }}>
|
||||
<Box
|
||||
component="div"
|
||||
sx={{ display: "flex", flexWrap: "wrap", p: theme.spacing(1, 0) }}
|
||||
>
|
||||
{trial.artifacts.map((artifact) => {
|
||||
const urlPath = `/artifacts/${trial.study_id}/${trial.trial_id}/${artifact.artifact_id}`
|
||||
return (
|
||||
|
||||
@@ -34,7 +34,14 @@ import {
|
||||
useThreejsArtifactModal,
|
||||
} from "../Artifact/ThreejsArtifactViewer"
|
||||
import { PreferentialOutputComponent } from "./PreferentialOutputComponent"
|
||||
import { Artifact, FeedbackComponentArtifact, FeedbackComponentNote, FeedbackComponentType, StudyDetail, Trial } from "ts/types"
|
||||
import {
|
||||
Artifact,
|
||||
FeedbackComponentArtifact,
|
||||
FeedbackComponentNote,
|
||||
FeedbackComponentType,
|
||||
StudyDetail,
|
||||
Trial,
|
||||
} from "ts/types"
|
||||
|
||||
const SettingsPage: FC<{
|
||||
studyDetail: StudyDetail
|
||||
@@ -246,7 +253,7 @@ const PreferentialTrial: FC<{
|
||||
>
|
||||
<CardActions>
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
margin: theme.spacing(0, 2),
|
||||
maxWidth: `calc(${trialWidth}px - ${
|
||||
@@ -325,7 +332,7 @@ const PreferentialTrial: FC<{
|
||||
urlPath={urlPath}
|
||||
/>
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
@@ -546,7 +553,10 @@ export const PreferentialTrials: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box component="div" sx={{ display: "flex", flexDirection: "row", flexWrap: "wrap" }}>
|
||||
<Box
|
||||
component="div"
|
||||
sx={{ display: "flex", flexDirection: "row", flexWrap: "wrap" }}
|
||||
>
|
||||
{displayTrials.display.map((t, index) => {
|
||||
const trial = activeTrials.find((trial) => trial.number === t)
|
||||
const candidates = displayTrials.display.filter(
|
||||
@@ -578,7 +588,7 @@ export const PreferentialTrials: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
{detailTrial !== null && (
|
||||
<Modal open={true} onClose={() => setDetailTrial(null)}>
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
@@ -594,7 +604,7 @@ export const PreferentialTrials: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
|
||||
@@ -98,7 +98,7 @@ export const StudyList: FC<{
|
||||
}))
|
||||
const sortBySelect = (
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
position: "relative",
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
@@ -106,7 +106,7 @@ export const StudyList: FC<{
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
component="div"
|
||||
component="div"
|
||||
sx={{
|
||||
padding: theme.spacing(0, 2),
|
||||
height: "100%",
|
||||
|
||||
@@ -17,7 +17,15 @@ import { DebouncedInputTextField } from "./Debounce"
|
||||
import { actionCreator } from "../action"
|
||||
import { useTrialUpdatingValue } from "../state"
|
||||
import * as Optuna from "@optuna/types"
|
||||
import { FormWidgets, ObjectiveChoiceWidget, ObjectiveSliderWidget, ObjectiveTextInputWidget, ObjectiveUserAttrRef, Trial, UserAttrFormWidget } from "ts/types"
|
||||
import {
|
||||
FormWidgets,
|
||||
ObjectiveChoiceWidget,
|
||||
ObjectiveSliderWidget,
|
||||
ObjectiveTextInputWidget,
|
||||
ObjectiveUserAttrRef,
|
||||
Trial,
|
||||
UserAttrFormWidget,
|
||||
} from "ts/types"
|
||||
|
||||
type WidgetState = {
|
||||
isValid: boolean
|
||||
|
||||
@@ -5,7 +5,13 @@ import {
|
||||
DarkColorTemplates,
|
||||
} from "./components/PlotlyColorTemplates"
|
||||
import { useLocalStorage } from "usehooks-ts"
|
||||
import { Artifact, PlotlyColorTheme, StudyDetail, StudyDetails, StudySummary } from "./types"
|
||||
import {
|
||||
Artifact,
|
||||
PlotlyColorTheme,
|
||||
StudyDetail,
|
||||
StudyDetails,
|
||||
StudySummary,
|
||||
} from "./types"
|
||||
|
||||
export const studySummariesState = atom<StudySummary[]>({
|
||||
key: "studySummaries",
|
||||
|
||||
Reference in New Issue
Block a user