# Generated by Django 5.2.1 on 2025-09-09 09:21

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('epdb', '0001_squashed_0003_applicabilitydomain_url_compound_url_and_more'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='mlrelativereasoning',
            options={},
        ),
        migrations.AlterField(
            model_name='mlrelativereasoning',
            name='data_packages',
            field=models.ManyToManyField(related_name='%(app_label)s_%(class)s_data_packages', to='epdb.package', verbose_name='Data Packages'),
        ),
        migrations.AlterField(
            model_name='mlrelativereasoning',
            name='eval_packages',
            field=models.ManyToManyField(related_name='%(app_label)s_%(class)s_eval_packages', to='epdb.package', verbose_name='Evaluation Packages'),
        ),
        migrations.AlterField(
            model_name='mlrelativereasoning',
            name='rule_packages',
            field=models.ManyToManyField(related_name='%(app_label)s_%(class)s_rule_packages', to='epdb.package', verbose_name='Rule Packages'),
        ),
        migrations.CreateModel(
            name='RuleBasedRelativeReasoning',
            fields=[
                ('epmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='epdb.epmodel')),
                ('threshold', models.FloatField(default=0.5)),
                ('eval_results', models.JSONField(blank=True, default=dict, null=True)),
                ('model_status', models.CharField(choices=[('INITIAL', 'Initial'), ('INITIALIZING', 'Model is initializing.'), ('BUILDING', 'Model is building.'), ('BUILT_NOT_EVALUATED', 'Model is built and can be used for predictions, Model is not evaluated yet.'), ('EVALUATING', 'Model is evaluating'), ('FINISHED', 'Model has finished building and evaluation.'), ('ERROR', 'Model has failed.')], default='INITIAL')),
                ('min_count', models.IntegerField(default=10)),
                ('max_count', models.IntegerField(default=0)),
                ('app_domain', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='epdb.applicabilitydomain')),
                ('data_packages', models.ManyToManyField(related_name='%(app_label)s_%(class)s_data_packages', to='epdb.package', verbose_name='Data Packages')),
                ('eval_packages', models.ManyToManyField(related_name='%(app_label)s_%(class)s_eval_packages', to='epdb.package', verbose_name='Evaluation Packages')),
                ('rule_packages', models.ManyToManyField(related_name='%(app_label)s_%(class)s_rule_packages', to='epdb.package', verbose_name='Rule Packages')),
            ],
            options={
                'abstract': False,
            },
            bases=('epdb.epmodel',),
        ),
        migrations.DeleteModel(
            name='RuleBaseRelativeReasoning',
        ),
    ]
