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 use TM_LOG_LEVEL environment variable first #1071

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

zhyncs
Copy link
Contributor

@zhyncs zhyncs commented Jan 30, 2024

Motivation

use TM_LOG_LEVEL environment variable first

When I want to print the Turbomind's debug log, I set TM_DEBUG_LEVEL=DEBUG and TM_LOG_LEVEL=DEBUG. It doesn't work and I find that I must use the --log-level DEBUG command line argument. It's very unintuitive.

Modification

Set log level for Turbomind only when environment variable TM_LOG_LEVEL has not been set. After this modification, when environment variable TM_LOG_LEVEL has been set, use it first rather than the command line config or the default config.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@zhyncs
Copy link
Contributor Author

zhyncs commented Jan 30, 2024

Hi @lzhangzz @AllentDan @lvhan028 May you help review this pr? Thanks.

@zhyncs
Copy link
Contributor Author

zhyncs commented Jan 31, 2024

ping @lvhan028

@lvhan028
Copy link
Collaborator

busy with v0.2.2 release now, no rush

@lvhan028
Copy link
Collaborator

lvhan028 commented Feb 1, 2024

May do the same change in api.py

@zhyncs
Copy link
Contributor Author

zhyncs commented Feb 1, 2024

May do the same change in api.py

ok

@zhyncs
Copy link
Contributor Author

zhyncs commented Feb 1, 2024

May do the same change in api.py

done

@lvhan028 lvhan028 merged commit 453cc25 into InternLM:main Feb 1, 2024
4 checks passed
@zhyncs zhyncs deleted the patch-1 branch February 1, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants