Skip to content

Commit

Permalink
Fixing bugs and making improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kkingstoun committed Jan 29, 2024
1 parent a09bc30 commit 88194f2
Show file tree
Hide file tree
Showing 47 changed files with 545 additions and 880 deletions.
3 changes: 2 additions & 1 deletion backend/amuman/settings_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@

STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'manager/static'),
]
]
URL_MODE_PREFIX = "manager"
139 changes: 129 additions & 10 deletions backend/common_models/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Generated by Django 5.0 on 2024-01-24 11:45
# Generated by Django 4.2.9 on 2024-01-28 20:32

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


class Migration(migrations.Migration):
Expand All @@ -9,26 +11,143 @@ class Migration(migrations.Migration):
dependencies = []

operations = [
migrations.CreateModel(
name="Nodes",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("ip", models.CharField(max_length=15, unique=True)),
(
"name",
models.CharField(blank=True, max_length=15, null=True, unique=True),
),
("port", models.IntegerField(blank=True, null=True)),
(
"number_of_gpus",
models.CharField(blank=True, max_length=15, null=True),
),
("gpu_info", models.TextField(blank=True, null=True)),
("status", models.CharField(default="free", max_length=10)),
(
"last_seen",
models.DateTimeField(
blank=True, default=django.utils.timezone.now, null=True
),
),
],
),
migrations.CreateModel(
name="Task",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
models.AutoField(primary_key=True, serialize=False, unique=True),
),
("path", models.CharField(max_length=500)),
("user", models.CharField(blank=True, max_length=100, null=True)),
("path", models.TextField()),
("node_name", models.CharField(blank=True, max_length=100, null=True)),
("port", models.IntegerField(blank=True, null=True)),
("submit_time", models.DateTimeField(blank=True, null=True)),
("start_time", models.DateTimeField(blank=True, null=True)),
("end_time", models.DateTimeField(blank=True, null=True)),
("error_time", models.DateTimeField(blank=True, null=True)),
("priority", models.IntegerField(default=0)),
("status", models.CharField(default="waiting", max_length=50)),
(
"priority",
models.CharField(
choices=[
("slow", "Slow"),
("normal", "Normal"),
("fast", "Fast"),
],
default="normal",
max_length=6,
),
),
(
"gpu_partition",
models.CharField(
choices=[
("slow", "Slow"),
("normal", "Normal"),
("fast", "Fast"),
],
default="normal",
max_length=6,
),
),
("est", models.DurationField(blank=True, null=True)),
(
"status",
models.CharField(
choices=[
("Waiting", "Waiting"),
("Pending", "Pending"),
("Running", "Running"),
("Finished", "Finished"),
("Interrupted", "Interrupted"),
],
default="Free",
max_length=50,
),
),
(
"assigned_node_id",
models.CharField(blank=True, max_length=10, null=True),
),
(
"assigned_gpu_id",
models.CharField(blank=True, max_length=10, null=True),
),
],
),
migrations.CreateModel(
name="Gpus",
fields=[
(
"id",
models.AutoField(primary_key=True, serialize=False, unique=True),
),
("gpu_uuid", models.TextField(blank=True, null=True, unique=True)),
("brand_name", models.TextField(blank=True, null=True)),
("gpu_speed", models.TextField(blank=True, null=True)),
("gpu_util", models.TextField(blank=True, null=True)),
("is_running_amumax", models.TextField(blank=True, null=True)),
("gpu_info", models.TextField(blank=True, null=True)),
(
"status",
models.CharField(
choices=[
("Free", "Free"),
("Running", "Running"),
("Reserved", "Reserved"),
("Unavailable", "Unavailable"),
],
default="Free",
max_length=50,
),
),
(
"last_update",
models.DateTimeField(
blank=True, default=django.utils.timezone.now, null=True
),
),
(
"node_id",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="common_models.nodes",
),
),
(
"task_id",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="gpu_tasks",
to="common_models.task",
),
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Generated by Django 4.2.9 on 2024-01-28 21:05

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("common_models", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="gpus",
name="status",
field=models.CharField(
choices=[
("Waiting", "Waiting"),
("Running", "Running"),
("Reserved", "Reserved"),
("Unavailable", "Unavailable"),
],
default="Waiting",
max_length=50,
),
),
migrations.AlterField(
model_name="nodes",
name="status",
field=models.CharField(
choices=[
("Waiting", "Waiting"),
("Running", "Running"),
("Reserved", "Reserved"),
("Unavailable", "Unavailable"),
],
default="Waiting",
max_length=50,
),
),
migrations.AlterField(
model_name="task",
name="status",
field=models.CharField(
choices=[
("Waiting", "Waiting"),
("Pending", "Pending"),
("Running", "Running"),
("Finished", "Finished"),
("Interrupted", "Interrupted"),
],
default="Waiting",
max_length=50,
),
),
]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Generated by Django 4.2.9 on 2024-01-27 14:44
# Generated by Django 4.2.9 on 2024-01-28 22:34

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("common_models", "0009_task_est_task_gpu_partition_alter_task_id"),
("common_models", "0002_alter_gpus_status_alter_nodes_status_and_more"),
]

operations = [
migrations.AlterField(
model_name="task",
name="est",
field=models.DurationField(blank=True, null=True),
field=models.CharField(blank=True, max_length=100, null=True),
),
]
51 changes: 0 additions & 51 deletions backend/common_models/migrations/0003_nodes_gpus.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 4.2.9 on 2024-01-29 10:36

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("common_models", "0003_alter_task_est"),
]

operations = [
migrations.AddField(
model_name="gpus",
name="no",
field=models.IntegerField(blank=True, default=0, null=True),
),
migrations.AlterField(
model_name="task",
name="gpu_partition",
field=models.CharField(
choices=[("Slow", "Slow"), ("Normal", "Normal"), ("Fast", "Fast")],
default="normal",
max_length=6,
),
),
migrations.AlterField(
model_name="task",
name="priority",
field=models.CharField(
choices=[("Slow", "Slow"), ("Normal", "Normal"), ("Fast", "Fast")],
default="normal",
max_length=6,
),
),
]
17 changes: 0 additions & 17 deletions backend/common_models/migrations/0004_nodes_number_of_gpus.py

This file was deleted.

20 changes: 0 additions & 20 deletions backend/common_models/migrations/0005_gpus_last_update.py

This file was deleted.

Loading

0 comments on commit 88194f2

Please sign in to comment.