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

Feature/SK-634 | Add logging to controller #506

Merged
merged 3 commits into from
Jan 30, 2024
Merged

Feature/SK-634 | Add logging to controller #506

merged 3 commits into from
Jan 30, 2024

Conversation

ahellander
Copy link
Member

Description

Updates controller to use logging module.

Closed SK-634

@Wrede Wrede changed the title Feature/sk 634 Feature/SK-634 | Add logging to controller Jan 30, 2024
@@ -80,14 +80,14 @@
},
{
"cell_type": "code",
"execution_count": 70,
Copy link
Collaborator

Choose a reason for hiding this comment

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

??

@@ -54,8 +54,7 @@ def push_round_config(self, round_config):
round_config['_job_id'] = str(uuid.uuid4())
self.round_configs.put(round_config)
except Exception:
logger.warning(
"ROUNDCONTROL: Failed to push round config.")
logger.warning("Failed to push round config.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be logger.error since it contains "raise"

@@ -220,12 +217,11 @@ def stage_model(self, model_id, timeout_retry=3, retry=2):
if model:
break
except Exception:
logger.info("ROUNDCONTROL: Could not fetch model from storage backend, retrying.")
logger.info("Could not fetch model from storage backend, retrying.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

logger.warning

time.sleep(timeout_retry)
tries += 1
if tries > retry:
logger.info(
"ROUNDCONTROL: Failed to stage model {} from storage backend!".format(model_id))
logger.info("Failed to stage model {} from storage backend!".format(model_id))
Copy link
Collaborator

Choose a reason for hiding this comment

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

logger.error since "raise"

return

if not self.statestore.get_latest_model():
print("No model in model chain, please provide a seed model!")
logger.info("No model in model chain, please provide a seed model!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

logger.warning

return
self.__state = ReducerState.instructing

# Check for a model chain
if not self.statestore.latest_model():
print("No model in model chain, please seed the alliance!")
logger.info("No model in model chain, please seed the alliance!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

logger.warning, also "alliance"?

@@ -399,7 +361,7 @@ def inference_round(self, config):

# Check for at least one combiner in statestore
if len(self.network.get_combiners()) < 1:
print("REDUCER: No combiners connected!")
logger.warning("REDUCER: No combiners connected!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Controller

"REDUCER CONTROL: Storage backend not configured, waiting...",
flush=True,
)
logger.info("Storage backend not configured, waiting...")
Copy link
Collaborator

Choose a reason for hiding this comment

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

logger.warning

@ahellander ahellander requested a review from Wrede January 30, 2024 14:05
@Wrede Wrede merged commit 06c21ae into master Jan 30, 2024
15 checks passed
@Wrede Wrede deleted the feature/SK-634 branch January 30, 2024 16:43
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.

None yet

2 participants