Esempio n. 1
0
def create_ai_deployments(
        fet_oracle: FetOracle,
        resource_oracle: ResourceOracle) -> Dict[str, FunctionDeployment]:
    all_deployments = create_all_deployments(fet_oracle, resource_oracle)
    del all_deployments[images.tf_gpu_function]
    del all_deployments[images.pi_function]
    del all_deployments[images.fio_function]
    return all_deployments
Esempio n. 2
0
def create_service_deployments(
        fet_oracle: FetOracle,
        resource_oracle: ResourceOracle) -> Dict[str, FunctionDeployment]:
    all_deployments = create_all_deployments(fet_oracle, resource_oracle)
    del all_deployments[images.speech_inference_function]
    del all_deployments[images.mobilenet_inference_function]
    del all_deployments[images.resnet50_inference_function]
    del all_deployments[images.resnet50_preprocessing_function]
    del all_deployments[images.resnet50_training_function]
    return all_deployments
Esempio n. 3
0
def create_mixed_deployments(
        fet_oracle: FetOracle,
        resource_oracle: ResourceOracle) -> Dict[str, FunctionDeployment]:
    return create_all_deployments(fet_oracle, resource_oracle)
Esempio n. 4
0
from sim.metrics import Metrics
from sim.skippy import SimulationClusterContext

np.random.seed(1234)
random.seed(1234)
logging.basicConfig(level=logging.INFO)

num_devices = 100
devices = generate_devices(num_devices, cloudcpu_settings)
ether_nodes = convert_to_ether_nodes(devices)

fet_oracle = Raith21FetOracle(ai_execution_time_distributions)
resource_oracle = Raith21ResourceOracle(ai_resources_per_node_image)

deployments = list(
    create_all_deployments(fet_oracle, resource_oracle).values())
function_images = images.all_ai_images

predicates = []
predicates.extend(Scheduler.default_predicates)
predicates.extend([
    CanRunPred(fet_oracle, resource_oracle),
    NodeHasAcceleratorPred(),
    NodeHasFreeGpu(),
    NodeHasFreeTpu()
])

priorities = vanilla.get_priorities()

sched_params = {
    'percentage_of_nodes_to_score': 100,