inference results

This commit is contained in:
Brandon Thomas committed 2021-05-15 18:01:32 -04:00
1 parent 6edbec3cb8
commit d1b7fef17c
4 files changed
+97 -9

No files matched your search

+2 -2
View File
@@ -94,7 +94,7 @@ CREATE TABLE w2l_templates (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- Effective "primary key" (PUBLIC)
token CHAR(16) NOT NULL UNIQUE,
token CHAR(16) NOT NULL,
template_type ENUM(
'not-set',
@@ -103,7 +103,7 @@ CREATE TABLE w2l_templates (
) NOT NULL DEFAULT 'not-set',
-- The title of the template.
title CHAR(255) NOT NULL UNIQUE,
title CHAR(255) NOT NULL,
-- Users can upload their own private templates.
-- They can choose to make them public later.
@@ -66,16 +66,16 @@ CREATE TABLE w2l_inference_jobs (
-- The W2L template to use
-- Can be an image or video.
-- This is null if we're using a custom uploaded image.
w2l_template_token CHAR(16) DEFAULT NULL,
maybe_w2l_template_token CHAR(16) DEFAULT NULL,
-- If we're using TTS results, this will be present
tts_inference_result_token CHAR(16) DEFAULT NULL,
maybe_tts_inference_result_token CHAR(16) DEFAULT NULL,
-- If we're using custom uploaded audio, this will be present.
audio_bucket_location CHAR(16) DEFAULT NULL,
maybe_audio_bucket_location CHAR(16) DEFAULT NULL,
-- If we're using a custom uploaded image, this will be present.
image_bucket_location CHAR(16) DEFAULT NULL,
maybe_image_bucket_location CHAR(16) DEFAULT NULL,
-- Jobs begin as "pending", then transition to other states.
-- Pending -> Started -> Complete
@@ -100,8 +100,8 @@ CREATE TABLE w2l_inference_jobs (
-- INDICES --
PRIMARY KEY (id),
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
KEY fk_w2l_template_token (w2l_template_token),
KEY fk_tts_inference_result_token (tts_inference_result_token),
KEY fk_maybe_w2l_template_token (maybe_w2l_template_token),
KEY fk_maybe_tts_inference_result_token (maybe_tts_inference_result_token),
KEY index_status (status),
KEY index_creator_ip_address (creator_ip_address)
@@ -1,2 +1,5 @@
# noinspection SqlResolveForFile
# noinspection SqlNoDataSourceInspectionForFile
drop table tts_results;
drop table w2l_results;
@@ -1,2 +1,87 @@
# noinspection SqlResolveForFile
# noinspection SqlNoDataSourceInspectionForFile
# noinspection SqlNoDataSourceInspectionForFile
CREATE TABLE tts_results (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- Effective "primary key" (PUBLIC)
token CHAR(32) NOT NULL,
-- The TTS model that was used
model_token CHAR(16) NOT NULL,
-- The original raw, unprocessed user input.
inference_text TEXT NOT NULL,
-- Users can upload their own private templates.
-- They can choose to make them public later.
is_private_for_creator BOOLEAN NOT NULL DEFAULT FALSE,
-- The person that created the template.
-- If the user wasn't logged in, this is null
maybe_creator_user_token CHAR(16) DEFAULT NULL,
-- For abuse tracking.
creator_ip_address CHAR(16) NOT NULL,
-- Where the wav, spectrogram, and etc. are located.
public_bucket_hash CHAR(32) NOT NULL UNIQUE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-- If this is removed by a mod or the creator.
deleted_at TIMESTAMP NULL,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token),
KEY fk_model_token (model_token),
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
KEY index_creator_ip_address (creator_ip_address)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE w2l_results (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- Effective "primary key" (PUBLIC)
token CHAR(32) NOT NULL,
-- The w2l template that was used (if set)
maybe_w2l_template_token CHAR(16) NOT NULL,
-- The inference result, if we're using them.
maybe_tts_inference_result_token CHAR(16) DEFAULT NULL,
-- Users can upload their own private templates.
-- They can choose to make them public later.
is_private_for_creator BOOLEAN NOT NULL DEFAULT FALSE,
-- The person that created the template.
-- If the user wasn't logged in, this is null
maybe_creator_user_token CHAR(16) DEFAULT NULL,
-- For abuse tracking.
creator_ip_address CHAR(16) NOT NULL,
-- Where the wav, spectrogram, and etc. are located.
public_bucket_hash CHAR(32) NOT NULL UNIQUE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-- If this is removed by a mod or the creator.
deleted_at TIMESTAMP NULL,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token),
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
KEY fk_maybe_w2l_template_token (maybe_w2l_template_token),
KEY fk_maybe_tts_inference_result_token (maybe_tts_inference_result_token),
KEY index_creator_ip_address (creator_ip_address)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;