Skip to content

Split up the main function and add separate wait time script - #3

Open
isurugamage37 wants to merge 3 commits into
ckn_faas_workload_generatorfrom
MyTest
Open

Split up the main function and add separate wait time script#3
isurugamage37 wants to merge 3 commits into
ckn_faas_workload_generatorfrom
MyTest

Conversation

@isurugamage37

Copy link
Copy Markdown
Collaborator

No description provided.

return float('inf')

def get_wait():
channel = grpc.insecure_channel("149.165.151.41:8079")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a global config variable/file.

print(f"[{datetime.now()}] Failed to estimate for {model_name}: {e.details()}")
return float('inf')

def get_wait():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The estimated wait time is instantaneous per model. Doing it for all models is not necessary. This function can be removed. I suggest making /one/ get_estimated_wait for the smallest model, and adding the different service times for the other models. This reduces the number of rpcs.

Also please update the "if total_est > deadline /1000 :" clause below to avoid skipping requests, and invoking the fastest model (and maintaining a separate counter for these cases)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prof. @prateek-s ,

If we call mobilenet_v3_small to get the wait time, that time already includes mobilenet’s own service time. Should we subtract mobilenet’s service time first to get just the queue wait time, and then add each model’s own service time when estimating for other models?

return {m: await t for m, t in wait_tasks.items()}


def build_model_set(policy, wait_results, deadline_ms):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should take the "max model-set size" as a parameter. Is it "K" ?




async def QoED_test(transaction_id: str, deadline: int) -> dict:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename function to something like "main_ensemble_invoke"

@prateek-s

Copy link
Copy Markdown
Collaborator
  • Add a "best k" selection policy which selects the k highest accuracy (config parameter) models always. Similarly, add a "fastest k" policy. These set the baselines for static ensemble selection.
  • Logging: for each request, log its index, timestamp, models selected, and estimated wait time. Similarly on each request completion, log the finish time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants