| import uuid | |
| from django.contrib.auth import get_user_model | |
| from django.db import models | |
| User = get_user_model() | |
| class DashboardWidget(models.Model): | |
| WIDGET_TYPES = [ | |
| ("recent_runs", "Recent Runs"), | |
| ("gpu_monitor", "GPU Monitor"), | |
| ("loss_chart", "Loss Chart"), | |
| ("accuracy_chart", "Accuracy Chart"), | |
| ("metric_comparison", "Metric Comparison"), | |
| ("run_status", "Run Status Overview"), | |
| ("notes_feed", "Notes Feed"), | |
| ("model_registry", "Model Registry"), | |
| ("scheduler_queue", "Scheduler Queue"), | |
| ("custom_plot", "Custom Plot"), | |
| ("terminal", "Terminal"), | |
| ("sweep_monitor", "Sweep Monitor"), | |
| ("experiment_comparison", "Experiment Comparison"), | |
| ("system_health", "System Health"), | |
| ("live_log", "Live Log"), | |
| ] | |
| id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) | |
| user = models.ForeignKey( | |
| User, on_delete=models.CASCADE, related_name="dashboard_widgets" | |
| ) | |
| widget_type = models.CharField(max_length=30, choices=WIDGET_TYPES) | |
| title = models.CharField(max_length=100, blank=True) | |
| config = models.JSONField(default=dict) | |
| position_x = models.IntegerField(default=0) | |
| position_y = models.IntegerField(default=0) | |
| width = models.IntegerField(default=1) | |
| height = models.IntegerField(default=1) | |
| is_visible = models.BooleanField(default=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| class Meta: | |
| ordering = ["position_y", "position_x"] | |
Xet Storage Details
- Size:
- 1.55 kB
- Xet hash:
- d3c7fef7acaf300a3349f8af859b8c2b83013194defc2b0575b37ced311ba445
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.