-
Notifications
You must be signed in to change notification settings - Fork 665
Can't update problem status with [WARN] Failed to get memory percentile. #195
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
Comments
I have the same issue on Mac using Golang. |
In fact, the submit command and result provider do not contain logic to update/refresh the tree explorer... Seems that with or without the Do you mean after refreshing, the problem status still is not updated? |
Yes, after refreshing |
@tomleung1996 Could you please provide the accepted code for the convenience of reproducing the bug? |
It seems that this situation has some uncertainty. Some questions' status can be updated today, but others still not. class Solution(object): def hasPathSum(self, root, sum): """ :type root: TreeNode :type sum: int :rtype: bool """ if not root: return False sum -= root.val if sum == 0 and not root.left and not root.right: return True return self.hasPathSum(root.left, sum) or self.hasPathSum(root.right, sum) |
@tomleung1996 Yes, I failed to trigger the warning. After some efforts of investigation, I finally get to know that it is not the problem with skygragon's leetcode-cli, but @jdneo 's forked version. There's if (result.memory && result.memory_percentile)
printLine(result, 'Your memory usage beats %d %% of %s submissions (%s)',
result.memory_percentile.toFixed(2), result.lang, result.memory);
else
return log.warn('Failed to get memory percentile.'); And at the last line of function there is: // update this problem status in local cache
core.updateProblem(problem, {state: (result.ok ? 'ac' : 'notac')}); Originally, the former code logic was wrapped in a callback, so when Yet now the former code is exposed in the same level as the latter, so when the If you delete the cache in |
@tomleung1996 Will your problem be solved if adopting the workaround that @Vigilans provides? |
Works fine for me, thanks! XD |
Cool! |
🐛 Bug Report
When I submitted the answer and get accepted, the last line of the response was
[WARN] Failed to get memory percentile.
And with this warning, the problem status cannot be updated, even though my answer was accepted.
To Reproduce
Just submit the question.
Expected behavior
Problem status not updated
Your Environment
The text was updated successfully, but these errors were encountered: