From 4be147f16006944953ae4d01e089229768828fce Mon Sep 17 00:00:00 2001 From: Alejandro Aristizabal Date: Mon, 22 Jul 2024 10:44:02 -0500 Subject: [PATCH 1/5] increase datasets description length --- server/dataset/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/dataset/models.py b/server/dataset/models.py index 2af4c44dc..c2f966a86 100644 --- a/server/dataset/models.py +++ b/server/dataset/models.py @@ -11,7 +11,7 @@ class Dataset(models.Model): ) name = models.CharField(max_length=20) - description = models.CharField(max_length=20, blank=True) + description = models.CharField(max_length=256, blank=True) location = models.CharField(max_length=100, blank=True) owner = models.ForeignKey(User, on_delete=models.PROTECT) input_data_hash = models.CharField(max_length=128) From 77c639af0041be3fcc3d72edf9068997bae1e340 Mon Sep 17 00:00:00 2001 From: Alejandro Aristizabal Date: Mon, 22 Jul 2024 11:50:35 -0500 Subject: [PATCH 2/5] Generate field migration --- .../0005_alter_dataset_description.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 server/dataset/migrations/0005_alter_dataset_description.py diff --git a/server/dataset/migrations/0005_alter_dataset_description.py b/server/dataset/migrations/0005_alter_dataset_description.py new file mode 100644 index 000000000..0566ce684 --- /dev/null +++ b/server/dataset/migrations/0005_alter_dataset_description.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.20 on 2024-07-22 16:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dataset', '0004_auto_20231211_1827'), + ] + + operations = [ + migrations.AlterField( + model_name='dataset', + name='description', + field=models.CharField(blank=True, max_length=256), + ), + ] From 78ec04feb21f5bad7384a1e18d7fdb95d2da9e44 Mon Sep 17 00:00:00 2001 From: Alejandro Aristizabal Date: Mon, 19 Aug 2024 16:34:29 -0500 Subject: [PATCH 3/5] Make server changes --- .../migrations/0003_auto_20240819_2132.py | 23 +++++++++++++++++++ server/benchmark/models.py | 4 ++-- .../migrations/0006_auto_20240819_2132.py | 23 +++++++++++++++++++ server/dataset/models.py | 4 ++-- .../migrations/0003_alter_modelresult_name.py | 18 +++++++++++++++ server/result/models.py | 2 +- 6 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 server/benchmark/migrations/0003_auto_20240819_2132.py create mode 100644 server/dataset/migrations/0006_auto_20240819_2132.py create mode 100644 server/result/migrations/0003_alter_modelresult_name.py diff --git a/server/benchmark/migrations/0003_auto_20240819_2132.py b/server/benchmark/migrations/0003_auto_20240819_2132.py new file mode 100644 index 000000000..eb37f581c --- /dev/null +++ b/server/benchmark/migrations/0003_auto_20240819_2132.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.20 on 2024-08-19 21:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('benchmark', '0002_alter_benchmark_demo_dataset_tarball_url'), + ] + + operations = [ + migrations.AlterField( + model_name='benchmark', + name='description', + field=models.CharField(blank=True, max_length=256), + ), + migrations.AlterField( + model_name='benchmark', + name='name', + field=models.CharField(max_length=64, unique=True), + ), + ] diff --git a/server/benchmark/models.py b/server/benchmark/models.py index 2e0d51e3d..1633836f4 100644 --- a/server/benchmark/models.py +++ b/server/benchmark/models.py @@ -16,8 +16,8 @@ class Benchmark(models.Model): ("OPERATION", "OPERATION"), ) - name = models.CharField(max_length=20, unique=True) - description = models.CharField(max_length=100, blank=True) + name = models.CharField(max_length=64, unique=True) + description = models.CharField(max_length=256, blank=True) docs_url = models.CharField(max_length=100, blank=True) owner = models.ForeignKey(User, on_delete=models.PROTECT) demo_dataset_tarball_url = models.CharField(max_length=256) diff --git a/server/dataset/migrations/0006_auto_20240819_2132.py b/server/dataset/migrations/0006_auto_20240819_2132.py new file mode 100644 index 000000000..5b3938710 --- /dev/null +++ b/server/dataset/migrations/0006_auto_20240819_2132.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.20 on 2024-08-19 21:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dataset', '0005_alter_dataset_description'), + ] + + operations = [ + migrations.AlterField( + model_name='dataset', + name='location', + field=models.CharField(blank=True, max_length=256), + ), + migrations.AlterField( + model_name='dataset', + name='name', + field=models.CharField(max_length=64), + ), + ] diff --git a/server/dataset/models.py b/server/dataset/models.py index c2f966a86..e3adb427d 100644 --- a/server/dataset/models.py +++ b/server/dataset/models.py @@ -10,9 +10,9 @@ class Dataset(models.Model): ("OPERATION", "OPERATION"), ) - name = models.CharField(max_length=20) + name = models.CharField(max_length=64) description = models.CharField(max_length=256, blank=True) - location = models.CharField(max_length=100, blank=True) + location = models.CharField(max_length=256, blank=True) owner = models.ForeignKey(User, on_delete=models.PROTECT) input_data_hash = models.CharField(max_length=128) generated_uid = models.CharField(max_length=128) diff --git a/server/result/migrations/0003_alter_modelresult_name.py b/server/result/migrations/0003_alter_modelresult_name.py new file mode 100644 index 000000000..1ad39da56 --- /dev/null +++ b/server/result/migrations/0003_alter_modelresult_name.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.20 on 2024-08-19 21:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('result', '0002_auto_20231124_0208'), + ] + + operations = [ + migrations.AlterField( + model_name='modelresult', + name='name', + field=models.CharField(blank=True, max_length=64), + ), + ] diff --git a/server/result/models.py b/server/result/models.py index 3bed25b31..9b2376f5e 100644 --- a/server/result/models.py +++ b/server/result/models.py @@ -11,7 +11,7 @@ class ModelResult(models.Model): ("REJECTED", "REJECTED"), ) - name = models.CharField(max_length=20, blank=True) + name = models.CharField(max_length=64, blank=True) owner = models.ForeignKey(User, on_delete=models.PROTECT) benchmark = models.ForeignKey("benchmark.Benchmark", on_delete=models.CASCADE) model = models.ForeignKey("mlcube.MlCube", on_delete=models.PROTECT) From e9bdbf0a75b235b6021879b5fbc867e222ff4c26 Mon Sep 17 00:00:00 2001 From: Alejandro Aristizabal Date: Mon, 19 Aug 2024 16:37:10 -0500 Subject: [PATCH 4/5] Make length changes to CLI entities --- cli/medperf/entities/benchmark.py | 2 +- cli/medperf/entities/dataset.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/medperf/entities/benchmark.py b/cli/medperf/entities/benchmark.py index 849ea3fcd..edea186de 100644 --- a/cli/medperf/entities/benchmark.py +++ b/cli/medperf/entities/benchmark.py @@ -23,7 +23,7 @@ class Benchmark(Entity, Uploadable, MedperfSchema, ApprovableSchema, DeployableS what models to run and how to evaluate them. """ - description: Optional[str] = Field(None, max_length=20) + description: Optional[str] = Field(None, max_length=256) docs_url: Optional[HttpUrl] demo_dataset_tarball_url: str demo_dataset_tarball_hash: Optional[str] diff --git a/cli/medperf/entities/dataset.py b/cli/medperf/entities/dataset.py index 4c210431f..3d6c9226c 100644 --- a/cli/medperf/entities/dataset.py +++ b/cli/medperf/entities/dataset.py @@ -26,8 +26,8 @@ class Dataset(Entity, Uploadable, MedperfSchema, DeployableSchema): data preparation output. """ - description: Optional[str] = Field(None, max_length=20) - location: Optional[str] = Field(None, max_length=20) + description: Optional[str] = Field(None, max_length=256) + location: Optional[str] = Field(None, max_length=256) input_data_hash: str generated_uid: str data_preparation_mlcube: Union[int, str] From e38118076f0c6ed3e181eeb73be28a53d412eeab Mon Sep 17 00:00:00 2001 From: Alejandro Aristizabal Date: Tue, 20 Aug 2024 10:11:07 -0500 Subject: [PATCH 5/5] Set mlcube name to 64 --- server/mlcube/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/mlcube/models.py b/server/mlcube/models.py index 8835b31cb..ea42e70ab 100644 --- a/server/mlcube/models.py +++ b/server/mlcube/models.py @@ -10,7 +10,7 @@ class MlCube(models.Model): ("OPERATION", "OPERATION"), ) - name = models.CharField(max_length=20, unique=True) + name = models.CharField(max_length=64, unique=True) git_mlcube_url = models.CharField(max_length=256) mlcube_hash = models.CharField(max_length=100) git_parameters_url = models.CharField(max_length=256, blank=True)