-
Notifications
You must be signed in to change notification settings - Fork 22
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
Blue/executor split #365
Blue/executor split #365
Conversation
…into blue/executor-split
…into blue/executor-split
…into blue/executor-split
rename the example based on the new API to `blender.py`
…into blue/executor-split
…into blue/executor-split
19d0cc0
to
5dac94b
Compare
payload: Payload, | ||
max_workers: Optional[int] = None, | ||
timeout: Optional[timedelta] = None, | ||
budget: Optional[Union[float, Decimal]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... why specify budget
per task execution? ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azawlocki do we want to leave it here? or remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, the scope plus overall complexity is somewhat overwhelming for me, but I guess I'm just not that familiar with the codebase yet.
examples/blender/blender.py
Outdated
@@ -12,6 +12,7 @@ | |||
WorkContext, | |||
windows_event_loop_fix, | |||
) | |||
from yapapi.executor import Golem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's most likely not the scope of this PR but it would be best to make this from yapapi import Golem
, either by actually moving the code or just importing it in the base package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say this should be in the scope of the changes to be frozen - but I'll let @azawlocki decide if he'd like to proceed with reshuffling of code between the files within the scope of this pull request...
yapapi/executor/__init__.py
Outdated
""" | ||
logger.debug("Creating Executor instance; parameters: %s", locals()) | ||
self._init_api(app_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_init_api
is an internal one-liner which is used only here, I think it would be more readable if we just expanded it. Added bonus: it would make the fate of app_key
slightly easier to follow (it's one less jump to make, the default env var substitution happens in Configuration#__init__
).
yapapi/executor/__init__.py
Outdated
# TODO: add message | ||
logger.debug("TODO", exc_info=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
async def _handle_proposal( | ||
self, | ||
proposal: OfferProposal, | ||
demand_builder: DemandBuilder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be an immutable representation of the demand rather than a builder object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a good idea. @azawlocki what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yapapi/executor/__init__.py
Outdated
# TODO: add message | ||
logger.debug("TODO", exc_info=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
c91830c
to
b5dade5
Compare
b5dade5
to
1973569
Compare
No description provided.