Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #32: Initial implementation of the non-blocking tagging task allocator. #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rafa-be
Copy link
Collaborator

@rafa-be rafa-be commented Dec 19, 2024

Adds a first implementation of a task allocator that supports tags. Scheduler is still using the old QueuedAllocator.

Once this replaces the old QueuedAllocator, it will also fix issue #45, as it removes the blocking worker queue.

@@ -4,4 +4,5 @@ graphlib-backport; python_version < '3.9'
psutil
pycapnp
pyzmq
sortedcontainers
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This does not really add a new dependency, as pycapnp already has it as a dependency.

metadata @2 :Data;
funcObjectId @3 :Data;
functionArgs @4 :List(Argument);
tags @2 :List(Text);
Copy link
Collaborator Author

@rafa-be rafa-be Dec 19, 2024

Choose a reason for hiding this comment

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

I'm using Capnp's text strings for tags. Alternatively, we could use UTF-8 encoded bytes.

metadata @2 :Data;
funcObjectId @3 :Data;
functionArgs @4 :List(Argument);
tags @2 :List(Text);
Copy link
Collaborator

Choose a reason for hiding this comment

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

add tags at last as @5

queuedTasks @3 :UInt32;
latencyUS @4 :UInt32;
taskLock @5 :Bool;
processors @6 :List(Status.ProcessorStatus);
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need shifting fields, put them to the last


from tests.utility import logging_test_name

MAX_TASKS_PER_WORKER = 10
Copy link
Collaborator

Choose a reason for hiding this comment

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

move this to default value file

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