Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Feat/acs/training ui (#112)
Browse files Browse the repository at this point in the history
* Add basic training UI

* Create application UI

* Formatting

* Try to get validation working

* Fix binder issue

* Get validation working

* Styleguide

* Use top menu navigation

* Add placeholder model view

* Run on 0.0.0.0

* listbox view

* Start splitting up Layouts

* Continue work on Job view

* Depend on both SDK versions

* Working on RDSJobDB

* Split off job configurator

* Created job db and serializers

* Cleanup

* Initial implementation

* Add a facade for example methods

* Implement JobRunner

* Refactor out training-test-util

* Add dataset display name. Revert gradle version to 5.6.4.

* Fix compiler errors. Start koin in job runner integ test

* Add web app listener to start koin

* Move Job DB into its own module

* Update wrapper

* Add fetch and count method to fulfill dataprovider contract

* Remove model view

* Use database with UI

* Add buttons back to Job Grid view

* Remove duplicated files

* Move repos to axon.kts.gradle

* Respond to comments

* Fix training integ tests

* Fix broken database selection test


Co-authored-by: Austin Shalit <[email protected]>
Co-authored-by: :) <[email protected]>
  • Loading branch information
3 people committed Nov 20, 2019
1 parent 2d15503 commit 7546c03
Show file tree
Hide file tree
Showing 57 changed files with 1,302 additions and 624 deletions.
21 changes: 18 additions & 3 deletions aws/aws.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,26 @@ dependencies {
api(project(":tf-data"))
api(project(":db-data"))

// implementation(platform("software.amazon.awssdk:bom:2.9.9"))
implementation(
api(
group = "software.amazon.awssdk",
name = "aws-sdk-java",
version = property("aws-sdk-java.version") as String
version = "2.10.12"
)
implementation(
group = "com.amazonaws",
name = "aws-java-sdk",
version = "1.11.674"
)

implementation(
group = "com.beust",
name = "klaxon",
version = property("klaxon.version") as String
)

implementation(group = "mysql",
name = "mysql-connector-java",
version = property("mysql-connector-java.version") as String
)

implementation(project(":logging"))
Expand Down
21 changes: 12 additions & 9 deletions aws/src/main/kotlin/edu/wpi/axon/aws/EC2TrainingScriptRunner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import java.util.concurrent.atomic.AtomicLong
import mu.KotlinLogging
import org.apache.commons.lang3.RandomStringUtils
import org.koin.core.KoinComponent
import org.koin.core.inject
import org.koin.core.qualifier.named
import software.amazon.awssdk.core.sync.RequestBody
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.ec2.Ec2Client
Expand All @@ -24,14 +22,19 @@ import software.amazon.awssdk.services.s3.model.PutObjectRequest
* S3. This implementation requires that the script does not try to manage models with S3 itself:
* this class will handle all of that. The script should just load and save the model from/to its
* current directory.
*
* @param bucketName The S3 bucket name to use for dataset and models.
* @param instanceType The type of the EC2 instance to run the training script on.
* @param region The region to connect to, or `null` to autodetect the region.
*/
class EC2TrainingScriptRunner : TrainingScriptRunner, KoinComponent {

private val region: Region by inject()
private val bucketName: String by inject(named("bucketName"))
private val instanceType: InstanceType by inject()
private val s3 by lazy { S3Client.builder().region(region).build() }
private val ec2 by lazy { Ec2Client.builder().region(region).build() }
class EC2TrainingScriptRunner(
private val bucketName: String,
private val instanceType: InstanceType,
private val region: Region?
) : TrainingScriptRunner, KoinComponent {

private val s3 by lazy { S3Client.builder().apply { region?.let { region(it) } }.build() }
private val ec2 by lazy { Ec2Client.builder().apply { region?.let { region(it) } }.build() }

private val nextScriptId = AtomicLong()
private val instanceIds = mutableMapOf<Long, String>()
Expand Down
169 changes: 0 additions & 169 deletions aws/src/main/kotlin/edu/wpi/axon/aws/db/DynamoJobDB.kt

This file was deleted.

48 changes: 0 additions & 48 deletions aws/src/main/kotlin/edu/wpi/axon/aws/db/JobDB.kt

This file was deleted.

Loading

0 comments on commit 7546c03

Please sign in to comment.