-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arabesque dataset initial version added
- Loading branch information
Showing
19 changed files
with
329 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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 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 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,8 @@ | ||
{ | ||
"workload_type": "arabesque", | ||
"notes": "arabesque dataset usage", | ||
"cluster_id": 1, | ||
"num_workloads":50, | ||
"plot_smoothing":301, | ||
"seed":42 | ||
} |
This file contains 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,8 @@ | ||
{ | ||
"workload_type": "arabesque", | ||
"notes": "arabesque dataset usage", | ||
"cluster_id": 1, | ||
"num_services":50, | ||
"plot_smoothing":301, | ||
"seed":42 | ||
} |
File renamed without changes.
This file contains 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 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 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 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 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 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
2 changes: 2 additions & 0 deletions
2
smart_scheduler/src/smart_scheduler/cluster_generator/__init__.py
This file contains 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from .cluster_generator_random import ClusterGeneratorRandom | ||
from .workload_generator_random import WorkloadGeneratorRandom | ||
from .workload_generator_arabesque import WorkloadGeneratorArabesque | ||
from .workload_generator_alibaba import WorkloadGeneratorAlibaba |
73 changes: 73 additions & 0 deletions
73
smart_scheduler/src/smart_scheduler/cluster_generator/workload_generator_alibaba.py
This file contains 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,73 @@ | ||
# TODO in case of integration with the Alibaba workload at | ||
# some point | ||
|
||
|
||
import numpy as np | ||
import random | ||
from tqdm import tqdm | ||
from smart_scheduler.util import ( | ||
plot_workload, | ||
rounding) | ||
import random | ||
import string | ||
from typing import List | ||
|
||
|
||
class WorkloadGeneratorAlibaba: | ||
def __init__(self, cluster, num_services, plot_smoothing, seed): | ||
""" | ||
cluster generator | ||
""" | ||
# self.cluster = cluster | ||
self.seed = seed | ||
np.random.seed(self.seed) | ||
random.seed(seed) | ||
# self.services_types: np.array = self.cluster['services_types'] | ||
|
||
self.plot_smoothing = plot_smoothing | ||
|
||
def make_workloads(self): | ||
""" | ||
making random workload per each service type | ||
each channel (third dimension) is a different workload for | ||
a different machine | ||
generating workloads | ||
timesteps | ||
| | | ||
| | | | | ||
ram | | | | | ||
cpu | | types of services | ||
start workload: | ||
different types | ||
ram | | | ||
cpu | | | ||
""" | ||
|
||
# option 1: with variations in the workload resource usage | ||
# workloads = np.zeros((self.num_resources, | ||
# self.timesteps, | ||
# self.num_services_types)) | ||
# workloads[:, 0] = self.start_workloads | ||
|
||
# for col in tqdm(range(1, self.timesteps)): | ||
# num_steps = np.random.randint(-self.workloads_max_steps, | ||
# self.workloads_max_steps+1) | ||
# steps = num_steps * self.workloads_steps_units | ||
# workloads[:, col] = workloads[:, col-1] + steps | ||
# workloads[workloads < 0] = 0 | ||
# workloads[workloads > 1] = 1 | ||
# workloads = np.round(workloads, 2) | ||
|
||
figs = [] | ||
# TODO use once done | ||
# for i in range(self.num_services_types): | ||
# workload_i = workloads[:, :, i] | ||
# fig = plot_workload(self.timesteps, workload_i, | ||
# self.plot_smoothing, i) | ||
# figs.append(fig) | ||
# return workloads, figs | ||
|
Oops, something went wrong.