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

Fix a logging related bug #3705

Merged
merged 3 commits into from
Jun 3, 2021
Merged

Conversation

liuzhe-lz
Copy link
Contributor

There is a bug in AML caused by trying to json stringify a circular object for logging.
Now the logging system automatically uses util.inspect() to print objects. So it's better to avoid JSON.stringify() for logging in case a circular object crashes the whole process and eats the message.
This PR also adds tag (class name) to most logging info.

@liuzhe-lz liuzhe-lz requested a review from ultmaster June 1, 2021 03:25
@ultmaster ultmaster requested a review from SparkSnail June 2, 2021 06:17
@@ -71,7 +71,7 @@ class NNIDataStore implements DataStore {

public storeTrialJobEvent(
event: TrialJobEvent, trialJobId: string, hyperParameter?: string, jobDetail?: TrialJobDetail): Promise<void> {
//this.log.debug(`storeTrialJobEvent: event: ${event}, data: ${hyperParameter}, jobDetail: ${JSON.stringify(jobDetail)}`);
//this.log.debug(`storeTrialJobEvent: event: ${event}, data: ${hyperParameter}, jobDetail:`, jobDetail);
Copy link
Contributor

Choose a reason for hiding this comment

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

If this log info is not used, could delete this line.

@liuzhe-lz liuzhe-lz merged commit 521f191 into microsoft:master Jun 3, 2021
@liuzhe-lz liuzhe-lz deleted the log-circular branch June 3, 2021 04:06
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

3 participants