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

[R-package] remove unnecessary comments #3356

Merged
merged 6 commits into from
Sep 11, 2020

Conversation

jameslamb
Copy link
Collaborator

This PR proposes removing some comments in the R package that I think are unnecessary.

There are a lot of things like this in the R code:

    # return ret
    return(ret)

Comments like this don't add any understanding of the code, but they do make it slightly harder to read and possibly lead to false positives when using git grep or similar tools to search through the codebase for things.

@StrikerRUS
Copy link
Collaborator

@jameslamb
Could you please fix some typos from #2912 in this PR as well?

I believe it is not "loss" but "metric" or "evaluation function".

# If loss is a single function, store it as a 1-element list

structture, higher_bettter

# get structture (name, higher_bettter, data_name)

Same as above for loss

# If loss is a single function, store it as a 1-element list

Maybe

assign(x = ACCUMULATOR_NAME, value = 0.0, envir = .GlobalEnv)

?

ACCUMULATOR_NAME <- "INCREASING_METRIC_ACUMULATOR"
assign(x = "INCREASING_METRIC_ACUMULATOR", value = 0.0, envir = .GlobalEnv)

@jameslamb
Copy link
Collaborator Author

@StrikerRUS sure, I agree with all those! Just pushed them: 727fe46

@StrikerRUS
Copy link
Collaborator

@jameslamb Thank you!

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

LGTM! I agree that those removed comments don't add any value. But I guess that actual approval should come from anyone who is reading/writing R code.

@jameslamb jameslamb merged commit 788f3a1 into microsoft:master Sep 11, 2020
@jameslamb jameslamb deleted the fix/remove-branches branch September 11, 2020 14:39
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants