FIRST-Tech-Challenge / fmltc

FIRST Machine Learning Toolchain
Other
38 stars 14 forks source link

Store training/eval summary items in their own entities, not in the model entity. #167

Closed lizlooney closed 2 years ago

lizlooney commented 2 years ago

Changed the way we store summary items. Previously they were stored in the model_entity. Now they are stored in a new kind of entity: model_summary_items_entity. This prevents us from exceeding the limits of a single entity.

In the models list, increase the time before retrieving a model entity during training to 5 minutes. This reduces the cost of app engine requests during training.

Added code to use GPUs. So far it doesn't not produce usable models, so it is stilled turned off.

github-actions[bot] commented 2 years ago

Terraform plan Succeeded for Workspace: default

Show Output ```diff An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: + create ! update in-place -/+ destroy and then create replacement Terraform will perform the following actions: # module.dev.google_app_engine_standard_app_version.fmltc-app-v1 will be updated in-place ! resource "google_app_engine_standard_app_version" "fmltc-app-v1" { id = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" name = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" # (9 unchanged attributes hidden) ! deployment { ! zip { ! source_url = "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/0a15b98eb7d289e914d3e30a34d49074.zip" -> "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/dde3b0df76cac48c23c4685af99e3137.zip" # (1 unchanged attribute hidden) } } - handlers { - auth_fail_action = "AUTH_FAIL_ACTION_REDIRECT" -> null - login = "LOGIN_OPTIONAL" -> null - security_level = "SECURE_OPTIONAL" -> null - url_regex = ".*" -> null - script { - script_path = "auto" -> null } } # (8 unchanged blocks hidden) } # module.dev.google_cloudfunctions_function.perform-action will be updated in-place ! resource "google_cloudfunctions_function" "perform-action" { id = "projects/ftc-ml-firstinspires-dev/locations/us-central1/functions/perform_action" name = "perform_action" ! source_archive_object = "3c88d78bdfafc3c3ff2132a7227d5fc8.zip" -> "e403ab959315ede86d104f667d546c8a.zip" # (13 unchanged attributes hidden) # (2 unchanged blocks hidden) } # module.dev.google_datastore_index.modelSummaryItems1 will be created + resource "google_datastore_index" "modelSummaryItems1" { + ancestor = "NONE" + id = (known after apply) + index_id = (known after apply) + kind = "ModelSummaryItems" + project = (known after apply) + properties { + direction = "ASCENDING" + name = "team_uuid" } + properties { + direction = "ASCENDING" + name = "model_uuid" } } # module.dev.google_datastore_index.modelSummaryItems2 will be created + resource "google_datastore_index" "modelSummaryItems2" { + ancestor = "NONE" + id = (known after apply) + index_id = (known after apply) + kind = "ModelSummaryItems" + project = (known after apply) + properties { + direction = "ASCENDING" + name = "team_uuid" } + properties { + direction = "ASCENDING" + name = "model_uuid" } + properties { + direction = "ASCENDING" + name = "job_type" } + properties { + direction = "ASCENDING" + name = "value_type" } } # module.dev.google_datastore_index.modelSummaryItems3 will be created + resource "google_datastore_index" "modelSummaryItems3" { + ancestor = "NONE" + id = (known after apply) + index_id = (known after apply) + kind = "ModelSummaryItems" + project = (known after apply) + properties { + direction = "ASCENDING" + name = "team_uuid" } + properties { + direction = "ASCENDING" + name = "model_uuid" } + properties { + direction = "ASCENDING" + name = "job_type" } + properties { + direction = "ASCENDING" + name = "value_type" } + properties { + direction = "ASCENDING" + name = "step" } } # module.dev.google_storage_bucket_object.app-server-archive must be replaced -/+ resource "google_storage_bucket_object" "app-server-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "1jZ+ag==" -> (known after apply) ! detect_md5hash = "ChW5jrfSiekU0+MKNNSQdA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gae-source-0a15b98eb7d289e914d3e30a34d49074.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "ChW5jrfSiekU0+MKNNSQdA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/0a15b98eb7d289e914d3e30a34d49074.zip?generation=1634874720746735&alt=media" -> (known after apply) - metadata = {} -> null ! name = "0a15b98eb7d289e914d3e30a34d49074.zip" -> "dde3b0df76cac48c23c4685af99e3137.zip" # forces replacement ! output_name = "0a15b98eb7d289e914d3e30a34d49074.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/0a15b98eb7d289e914d3e30a34d49074.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.closure_js must be replaced -/+ resource "google_storage_bucket_object" "closure_js" { ! crc32c = "J7F/QA==" -> (known after apply) ! detect_md5hash = "Uq/Inl1yvBZRo0mZESy9mA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-compiled/js/fmltc.js" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "Uq/Inl1yvBZRo0mZESy9mA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/compiled%2Fjs%2Ffmltc.js?generation=1634874720579014&alt=media" -> (known after apply) - metadata = {} -> null name = "compiled/js/fmltc.js" ! output_name = "compiled/js/fmltc.js" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/compiled%2Fjs%2Ffmltc.js" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (3 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.cloud-function-archive must be replaced -/+ resource "google_storage_bucket_object" "cloud-function-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "LFOp+g==" -> (known after apply) ! detect_md5hash = "PIjXi9+vw8P/ITKnIn1fyA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gcf-source-3c88d78bdfafc3c3ff2132a7227d5fc8.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "PIjXi9+vw8P/ITKnIn1fyA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/3c88d78bdfafc3c3ff2132a7227d5fc8.zip?generation=1634874720696780&alt=media" -> (known after apply) - metadata = {} -> null ! name = "3c88d78bdfafc3c3ff2132a7227d5fc8.zip" -> "e403ab959315ede86d104f667d546c8a.zip" # forces replacement ! output_name = "3c88d78bdfafc3c3ff2132a7227d5fc8.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/3c88d78bdfafc3c3ff2132a7227d5fc8.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.models["models/tf2/20200711/ssd_mobilenet_v1_fpn_640x640_coco17_tpu-8/pipeline.config"] must be replaced -/+ resource "google_storage_bucket_object" "models" { ! content_type = "text/plain; charset=utf-8" -> (known after apply) ! crc32c = "MvOB+w==" -> (known after apply) ! detect_md5hash = "c5EEOVoDQU3ZocvDbENeUA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-static/training/models/tf2/20200711/ssd_mobilenet_v1_fpn_640x640_coco17_tpu-8/pipeline.config" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "c5EEOVoDQU3ZocvDbENeUA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v1_fpn_640x640_coco17_tpu-8%2Fpipeline.config?generation=1633109876893959&alt=media" -> (known after apply) - metadata = {} -> null name = "static/training/models/tf2/20200711/ssd_mobilenet_v1_fpn_640x640_coco17_tpu-8/pipeline.config" ! output_name = "static/training/models/tf2/20200711/ssd_mobilenet_v1_fpn_640x640_coco17_tpu-8/pipeline.config" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v1_fpn_640x640_coco17_tpu-8%2Fpipeline.config" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.models["models/tf2/20200711/ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config"] must be replaced -/+ resource "google_storage_bucket_object" "models" { ! content_type = "text/plain; charset=utf-8" -> (known after apply) ! crc32c = "gtGigg==" -> (known after apply) ! detect_md5hash = "NaJKyaJDpZAxnR3u5NjINw==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-static/training/models/tf2/20200711/ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "NaJKyaJDpZAxnR3u5NjINw==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_320x320_coco17_tpu-8%2Fpipeline.config?generation=1633109877054247&alt=media" -> (known after apply) - metadata = {} -> null name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config" ! output_name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_320x320_coco17_tpu-8%2Fpipeline.config" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.models["models/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/pipeline.config"] must be replaced -/+ resource "google_storage_bucket_object" "models" { ! content_type = "text/plain; charset=utf-8" -> (known after apply) ! crc32c = "zngekw==" -> (known after apply) ! detect_md5hash = "qMOrfsr2WwHMxALV41Vyag==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/pipeline.config" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "qMOrfsr2WwHMxALV41Vyag==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8%2Fpipeline.config?generation=1633109877051675&alt=media" -> (known after apply) - metadata = {} -> null name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/pipeline.config" ! output_name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/pipeline.config" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8%2Fpipeline.config" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.models["models/tf2/20200711/ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8/pipeline.config"] must be replaced -/+ resource "google_storage_bucket_object" "models" { ! content_type = "text/plain; charset=utf-8" -> (known after apply) ! crc32c = "ztGx2w==" -> (known after apply) ! detect_md5hash = "4bwQnPhSCyaM02kQ/QkFiA==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8/pipeline.config" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "4bwQnPhSCyaM02kQ/QkFiA==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8%2Fpipeline.config?generation=1633109877067703&alt=media" -> (known after apply) - metadata = {} -> null name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8/pipeline.config" ! output_name = "static/training/models/tf2/20200711/ssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8/pipeline.config" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev/o/static%2Ftraining%2Fmodels%2Ftf2%2F20200711%2Fssd_mobilenet_v2_fpnlite_640x640_coco17_tpu-8%2Fpipeline.config" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } Plan: 10 to add, 2 to change, 7 to destroy. ```