Skip to content

Commit

Permalink
Migration fixes (#367)
Browse files Browse the repository at this point in the history
* fix(ansible): split conda setup commands into 3 steps

* Fix migration mismatch

* fix: make miniconda executable

---------

Co-authored-by: Anne Haley <anne.haley@kitware.com>
  • Loading branch information
JakeWags and annehaley authored Apr 12, 2024
1 parent 7ee3451 commit 79ce264
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.25 on 2024-04-11 16:23
# Generated by Django 3.2.25 on 2024-04-08 18:19

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -23,7 +23,7 @@ class Migration(migrations.Migration):
),
('particles', s3_file_field.fields.S3FileField()),
('scalar', s3_file_field.fields.S3FileField()),
('mesh', s3_file_field.fields.S3FileField()),
('vtk', s3_file_field.fields.S3FileField()),
('index', models.CharField(max_length=255)),
('example_type', models.CharField(max_length=255)),
('validation', models.BooleanField(default=False)),
Expand All @@ -47,7 +47,6 @@ class Migration(migrations.Migration):
),
),
('image', s3_file_field.fields.S3FileField()),
('index', models.CharField(max_length=255)),
('validation', models.BooleanField(default=False)),
(
'project',
Expand All @@ -69,7 +68,7 @@ class Migration(migrations.Migration):
),
),
('image_type', models.CharField(max_length=255)),
('image_id', models.CharField(max_length=255)),
('image_id', models.IntegerField()),
('mesh', s3_file_field.fields.S3FileField()),
('particles', s3_file_field.fields.S3FileField()),
(
Expand Down Expand Up @@ -117,7 +116,6 @@ class Migration(migrations.Migration):
),
),
('sample_num', models.IntegerField()),
('image', s3_file_field.fields.S3FileField()),
('mesh', s3_file_field.fields.S3FileField()),
('particles', s3_file_field.fields.S3FileField()),
(
Expand Down
123 changes: 123 additions & 0 deletions shapeworks_cloud/core/migrations/0040_deepssm_ui_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Generated by Django 3.2.25 on 2024-04-12 23:05

from django.db import migrations, models
import s3_file_field.fields


class Migration(migrations.Migration):

dependencies = [
('core', '0039_deepssm_phase2_3'),
]

operations = [
migrations.RemoveField(
model_name='deepssmtrainingpair',
name='vtk',
),
migrations.AddField(
model_name='deepssmaugpair',
name='image',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AddField(
model_name='deepssmtrainingimage',
name='index',
field=models.CharField(default='', max_length=255),
),
migrations.AddField(
model_name='deepssmtrainingpair',
name='mesh',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmaugpair',
name='mesh',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmaugpair',
name='particles',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmaugpair',
name='sample_num',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='aug_total_data',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='aug_visualization',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='testing_distances',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='training_data_table',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='training_visualization',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmresult',
name='training_visualization_ft',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmtestingdata',
name='image_id',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='deepssmtestingdata',
name='image_type',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='deepssmtestingdata',
name='mesh',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmtestingdata',
name='particles',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmtrainingimage',
name='image',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmtrainingpair',
name='example_type',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='deepssmtrainingpair',
name='index',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='deepssmtrainingpair',
name='particles',
field=s3_file_field.fields.S3FileField(null=True),
),
migrations.AlterField(
model_name='deepssmtrainingpair',
name='scalar',
field=s3_file_field.fields.S3FileField(null=True),
),
]
42 changes: 21 additions & 21 deletions shapeworks_cloud/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,49 +200,49 @@ class DeepSSMTestingData(models.Model):
project = models.ForeignKey(
Project, on_delete=models.CASCADE, related_name='deepssm_testing_data'
)
image_type = models.CharField(max_length=255)
image_id = models.CharField(max_length=255)
mesh = S3FileField()
particles = S3FileField()
image_type = models.CharField(max_length=255, default='')
image_id = models.CharField(max_length=255, default='')
mesh = S3FileField(null=True)
particles = S3FileField(null=True)


class DeepSSMTrainingPair(models.Model):
project = models.ForeignKey(
Project, on_delete=models.CASCADE, related_name='deepssm_training_pair'
)
particles = S3FileField() # .particles
scalar = S3FileField() # .scalar
mesh = S3FileField() # .vtk
index = models.CharField(max_length=255) # index
example_type = models.CharField(max_length=255) # best, median, worst
particles = S3FileField(null=True) # .particles
scalar = S3FileField(null=True) # .scalar
mesh = S3FileField(null=True) # .vtk
index = models.CharField(max_length=255, default='') # index
example_type = models.CharField(max_length=255, default='') # best, median, worst
validation = models.BooleanField(default=False)


class DeepSSMTrainingImage(models.Model):
project = models.ForeignKey(
Project, on_delete=models.CASCADE, related_name='deepssm_training_images'
)
image = S3FileField()
index = models.CharField(max_length=255) # index
image = S3FileField(null=True)
index = models.CharField(max_length=255, default='') # index
validation = models.BooleanField(default=False)


class DeepSSMAugPair(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name='deepssm_aug_pair')
sample_num = models.IntegerField()
image = S3FileField()
mesh = S3FileField()
particles = S3FileField()
sample_num = models.IntegerField(null=True)
image = S3FileField(null=True)
mesh = S3FileField(null=True)
particles = S3FileField(null=True)


class DeepSSMResult(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name='deepssm_results')
aug_visualization = S3FileField() # .png
aug_total_data = S3FileField() # .csv
training_visualization = S3FileField() # .png
training_visualization_ft = S3FileField() # .png
training_data_table = S3FileField() # .csv
testing_distances = S3FileField() # .csv
aug_visualization = S3FileField(null=True) # .png
aug_total_data = S3FileField(null=True) # .csv
training_visualization = S3FileField(null=True) # .png
training_visualization_ft = S3FileField(null=True) # .png
training_data_table = S3FileField(null=True) # .csv
testing_distances = S3FileField(null=True) # .csv


class GroomedSegmentation(TimeStampedModel, models.Model):
Expand Down

0 comments on commit 79ce264

Please sign in to comment.