Compute Worker- reorganizing and cleaning of compute worker#2294
Compute Worker- reorganizing and cleaning of compute worker#2294
Conversation
Some points for discussion:
Update: Ignore the question below because I added more stuff to settins and now this class has env variables and other settings e.g. directories and constants.
|
|
Hi @ihsaan-ullah, Could we replace: def prepare(self):
hostname = utils.nodenames.gethostname()
if self.is_scoring:
self._update_status(SubmissionStatus.RUNNING, extra_information=f"scoring_hostname-{hostname}")
else:
self._update_status(SubmissionStatus.RUNNING, extra_information=f"ingestion_hostname-{hostname}")
if not self.is_scoring:
# Only during prediction step do we want to announce "preparing"
self._update_status(SubmissionStatus.PREPARING)By: def prepare(self):
hostname = utils.nodenames.gethostname()
if self.is_scoring:
self._update_status(SubmissionStatus.RUNNING, extra_information=f"scoring_hostname-{hostname}")
else:
# Only during prediction step do we want to announce "preparing"
self._update_status(SubmissionStatus.PREPARING, extra_information=f"ingestion_hostname-{hostname}")? |
|
Yes why not. I would suggest to change RUNNING to SCORING like this def prepare(self):
hostname = utils.nodenames.gethostname()
if self.is_scoring:
self._update_status(SubmissionStatus.SCORING, extra_information=f"scoring_hostname-{hostname}")
else:
# Only during prediction step do we want to announce "preparing"
self._update_status(SubmissionStatus.PREPARING, extra_information=f"ingestion_hostname-{hostname}") |
|
Are we sure this initial "Running" state is not useful? |
|
This Running status is confusing because when ingestion runs at the end it changes status to |
|
We can note this down and change it in another PR along with some other small updates. |
I think this is fine, it is normal to have some |
|
I tried what we just discussed, but then the status remained stuck in "Scoring" instead of "Finished". I did the most preservative change: def prepare(self):
hostname = utils.nodenames.gethostname()
if self.is_scoring:
self._update_status(SubmissionStatus.RUNNING, extra_information=f"scoring_hostname-{hostname}")
else:
self._update_status(SubmissionStatus.RUNNING, extra_information=f"ingestion_hostname-{hostname}")
# Only during prediction step do we want to announce "preparing"
self._update_status(SubmissionStatus.PREPARING)It should be the same as before as the conditions However it looks like we stay in "Preparing" status for the whole ingestion program, never "Running". After some tests, this is already present in I also:
|
|
I fixed this by adding a update_status to RUNNING at the end of the The status updates workflow can be improved, but I think this is for another PR. This one is good to go on my side. |
|
I would suggest to move your changes to another PR because if something goes wrong then we revert a very small change. But if you are confident, I let you proceed. |
Description
This PR cleans the compute worker code and uses settings and other new classes for better readability and debugging
Checklist