-
Notifications
You must be signed in to change notification settings - Fork 1
Save simulation config #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ecff8af
Wire PHOLD config into admin and configuration page
bnmajor 281d91c
Split new simulation form and add saved simulations page
bnmajor ad241a0
Track SAVED runs separately from pending runs
bnmajor 1a021f0
Allow running/editing saved simulations from cards
bnmajor 82bb841
Expand simulation view tests for saved configs
bnmajor 7a878f3
Add PHOLD config migration
bnmajor 7e98fa2
Convert PHOLDSimulationForm to a ModelForm
bnmajor 0339bf3
Add some clarifying comments
bnmajor 9e4bea3
clone-on-edit UX, saved-run filtering, TODOs
bnmajor 492e9a9
Use shared client fixture for simulation view tests
bnmajor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from django.contrib import admin | ||
|
|
||
| from net_maestro.core.models import PHOLDSimulationConfig | ||
|
|
||
|
|
||
| @admin.register(PHOLDSimulationConfig) | ||
| class PHOLDSimulationConfigAdmin(admin.ModelAdmin): | ||
| list_select_related = ["run"] | ||
| list_display = ["id", "run", "synch", "nlp", "remote", "mean", "lookahead"] | ||
| list_filter = ["synch", "stagger"] | ||
| search_fields = ["run__name"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
net_maestro/core/migrations/0011_alter_run_status_pholdsimulationconfig.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| # Generated by Django 6.0.6 on 2026-08-19 14:24 | ||
| from __future__ import annotations | ||
|
|
||
| import django.core.validators | ||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("core", "0010_add_component_model"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name="run", | ||
| name="status", | ||
| field=models.CharField( | ||
| choices=[ | ||
| ("saved", "Saved"), | ||
| ("pending", "Pending"), | ||
| ("running", "Running"), | ||
| ("completed", "Completed"), | ||
| ("failed", "Failed"), | ||
| ("cancelled", "Cancelled"), | ||
| ], | ||
| default="saved", | ||
| max_length=20, | ||
| ), | ||
| ), | ||
| migrations.CreateModel( | ||
| name="PHOLDSimulationConfig", | ||
| fields=[ | ||
| ( | ||
| "id", | ||
| models.BigAutoField( | ||
| auto_created=True, primary_key=True, serialize=False, verbose_name="ID" | ||
| ), | ||
| ), | ||
| ( | ||
| "synch", | ||
| models.IntegerField( | ||
| choices=[ | ||
| (1, "Sequential"), | ||
| (2, "Conservative"), | ||
| (3, "Optimistic"), | ||
| (4, "Optimistic Debug"), | ||
| (5, "Optimistic Realtime"), | ||
| (6, "Reverse Handler Check"), | ||
| ], | ||
| default=3, | ||
| verbose_name="Synchronization protocol", | ||
| ), | ||
| ), | ||
| ( | ||
| "avl_size", | ||
| models.IntegerField( | ||
| default=18, | ||
| validators=[ | ||
| django.core.validators.MinValueValidator(10), | ||
| django.core.validators.MaxValueValidator(24), | ||
| ], | ||
| verbose_name="AVL tree size", | ||
| ), | ||
| ), | ||
| ( | ||
| "nlp", | ||
| models.IntegerField( | ||
| default=8, | ||
| validators=[django.core.validators.MinValueValidator(1)], | ||
| verbose_name="LPs per processor", | ||
| ), | ||
| ), | ||
| ( | ||
| "remote", | ||
| models.FloatField( | ||
| default=0.25, | ||
| validators=[ | ||
| django.core.validators.MinValueValidator(0.0), | ||
| django.core.validators.MaxValueValidator(1.0), | ||
| ], | ||
| verbose_name="Remote event rate", | ||
| ), | ||
| ), | ||
| ( | ||
| "mean", | ||
| models.FloatField( | ||
| default=1.0, | ||
| validators=[django.core.validators.MinValueValidator(0.1)], | ||
| verbose_name="Mean timestamp", | ||
| ), | ||
| ), | ||
| ( | ||
| "mult", | ||
| models.FloatField( | ||
| default=1.4, | ||
| validators=[django.core.validators.MinValueValidator(1.0)], | ||
| verbose_name="Memory multiplier", | ||
| ), | ||
| ), | ||
| ( | ||
| "lookahead", | ||
| models.FloatField( | ||
| default=1.0, validators=[django.core.validators.MinValueValidator(0.1)] | ||
| ), | ||
| ), | ||
| ( | ||
| "start_events", | ||
| models.IntegerField( | ||
| default=1, | ||
| validators=[django.core.validators.MinValueValidator(1)], | ||
| verbose_name="Start events per LP", | ||
| ), | ||
| ), | ||
| ( | ||
| "memory", | ||
| models.IntegerField( | ||
| default=100, | ||
| validators=[django.core.validators.MinValueValidator(0)], | ||
| verbose_name="Additional memory buffers", | ||
| ), | ||
| ), | ||
| ("stagger", models.BooleanField(default=False)), | ||
| ( | ||
| "run", | ||
| models.ForeignKey( | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="phold_configs", | ||
| to="core.run", | ||
| ), | ||
| ), | ||
| ], | ||
| ), | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.