This repository has been archived by the owner on Sep 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Wizard steps * Wizardy things * Implement onCommit for JobWizardItem * Add IMDB example * Added auto mpg to wizard and fix creation bug * Allow the wizard to be run multiple times * Possibly fixed the wizard model bug * Bump ci * Solve missing input selection options on first Wizard * Add name field description * Start work on togglegroup button * Fix JobWizardModel * Data grid with images * spotless * Center and style images * Convert task selection to datagrid * Add images * Remove 'a' from imdb description * Add target datagrid with images * Commit photos * Write to remaining wizard model fields in onCommit Co-authored-by: Austin Shalit <[email protected]>
- Loading branch information
1 parent
e0ea6ee
commit 77e9bc8
Showing
14 changed files
with
520 additions
and
73 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
ui-javafx/src/main/kotlin/edu/wpi/axon/ui/controller/WizardTaskService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package edu.wpi.axon.ui.controller | ||
|
||
import edu.wpi.axon.tfdata.Dataset | ||
import edu.wpi.axon.tfdata.loss.Loss | ||
import edu.wpi.axon.tfdata.optimizer.Optimizer | ||
import edu.wpi.axon.training.ModelDeploymentTarget | ||
import edu.wpi.axon.ui.model.DatasetType | ||
import edu.wpi.axon.ui.model.TaskInput | ||
import edu.wpi.axon.ui.model.WizardTarget | ||
import edu.wpi.axon.ui.model.WizardTask | ||
import javafx.collections.FXCollections | ||
import javafx.collections.ObservableList | ||
import tornadofx.Controller | ||
|
||
class WizardTaskService : Controller() { | ||
val tasks: ObservableList<WizardTask> = FXCollections.observableArrayList( | ||
WizardTask("Classification", | ||
"Separate items into categories", | ||
resources["/classification.png"], | ||
listOf( | ||
TaskInput("MNIST", | ||
"Classify handwritten digits", | ||
resources["/MNIST.png"], | ||
DatasetType.EXAMPLE, | ||
Dataset.ExampleDataset.Mnist, | ||
Optimizer.Adam(), | ||
Loss.CategoricalCrossentropy), | ||
TaskInput("Fashion MNIST", | ||
"Classify photos of clothing", | ||
resources["/Fashion_MNIST.png"], | ||
DatasetType.EXAMPLE, | ||
Dataset.ExampleDataset.FashionMnist, | ||
Optimizer.Adam(), | ||
Loss.CategoricalCrossentropy), | ||
TaskInput("IMDB", | ||
"Classify positive or negative movie reviews", | ||
resources["/imdb.png"], | ||
DatasetType.EXAMPLE, | ||
Dataset.ExampleDataset.IMDB, | ||
Optimizer.Adam(), | ||
Loss.CategoricalCrossentropy) | ||
)), | ||
WizardTask("Regression", | ||
"Perform a regression on a set of data", | ||
resources["/regression.png"], | ||
listOf( | ||
TaskInput("Auto MPG", | ||
"Predict the MPG of a provided vehicle configuration", | ||
resources["/auto_mpg_car.jpg"], | ||
DatasetType.EXAMPLE, | ||
Dataset.ExampleDataset.AutoMPG, | ||
Optimizer.RMSprop(), | ||
Loss.MeanSquaredError) | ||
)) | ||
) | ||
|
||
val targets: ObservableList<WizardTarget> = FXCollections.observableArrayList( | ||
WizardTarget("Desktop", "For inference on a computer", resources["/desktop.png"], ModelDeploymentTarget.Desktop::class), | ||
WizardTarget("Coral", "For inference with a Google™ Coral", resources["/coral.jpg"], ModelDeploymentTarget.Coral::class) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
ui-javafx/src/main/kotlin/edu/wpi/axon/ui/model/WizardTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package edu.wpi.axon.ui.model | ||
|
||
import edu.wpi.axon.tfdata.Dataset | ||
import edu.wpi.axon.tfdata.loss.Loss | ||
import edu.wpi.axon.tfdata.optimizer.Optimizer | ||
import edu.wpi.axon.training.ModelDeploymentTarget | ||
import kotlin.reflect.KClass | ||
|
||
data class TaskInput(val title: String = "", val description: String = "", val graphic: String? = null, val datasetType: DatasetType, val dataset: Dataset, val optimizer: Optimizer, val loss: Loss) | ||
|
||
data class WizardTask(val title: String = "", val description: String = "", val graphic: String? = null, val supportedInputs: List<TaskInput> = listOf()) | ||
|
||
data class WizardTarget(val title: String = "", val description: String = "", val graphic: String? = null, val targetClass: KClass<out ModelDeploymentTarget>) |
Oops, something went wrong.