Conversation
Summary of ChangesHello @youyeon11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 애플리케이션의 로깅 시스템을 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| state_dict = object[k] | ||
| break | ||
| try: | ||
| object = torch.load(model_path, map_location=self.device, weights_only=False) |
There was a problem hiding this comment.
torch.load에서 weights_only=False를 사용하는 것은 신뢰할 수 없는 소스의 모델 파일을 로드할 때 임의 코드 실행으로 이어질 수 있는 보안 위험을 초래할 수 있습니다. 모델의 state_dict만 로드하는 것이 더 안전합니다. weights_only=True로 설정하고 state_dict를 로드하도록 코드를 수정하는 것을 강력히 권장합니다.
| object = torch.load(model_path, map_location=self.device, weights_only=False) | |
| object = torch.load(model_path, map_location=self.device, weights_only=True) |
| openai | ||
| timm No newline at end of file | ||
| timm | ||
| logging No newline at end of file |
| async def process_image_scan(job: ImageJob, redis_client: redis.Redis): | ||
| correlationId = job.correlationId | ||
| print(f"[task] Start image scan for job_id={correlationId}") | ||
| logging.info(f"[task] Start image scan for job_id={correlationId}") |
There was a problem hiding this comment.
로그 메시지에 [task] 접두사를 수동으로 추가하고 있습니다. 로깅 설정(logging_config.py)에서 포맷터가 %(name)s을 통해 로거 이름(예: app.worker.tasks)을 자동으로 포함하므로, 이 접두사는 중복 정보를 만듭니다. 가독성을 높이고 로그 메시지를 간결하게 유지하기 위해 이 파일의 다른 로그 메시지(34, 56, 59, 61행)에서도 [task] 접두사를 제거하는 것을 권장합니다.
| logging.info(f"[task] Start image scan for job_id={correlationId}") | |
| logging.info(f"Start image scan for job_id={correlationId}") |
|
|
||
| async def run(self): | ||
| print(f"[worker] start consumer={settings.CONSUMER_NAME} group={settings.GROUP_NAME} stream={settings.STREAM_JOB}") | ||
| logging.info(f"[worker] start consumer={settings.CONSUMER_NAME} group={settings.GROUP_NAME} stream={settings.STREAM_JOB}") |
There was a problem hiding this comment.
로그 메시지에 [worker] 접두사를 수동으로 추가하고 있습니다. 로깅 설정(logging_config.py)에서 포맷터가 %(name)s을 통해 로거 이름(예: app.worker.worker)을 자동으로 포함하므로, 이 접두사는 중복 정보를 만듭니다. 가독성을 높이고 로그 메시지를 간결하게 유지하기 위해 [worker] 접두사가 포함된 이 파일의 다른 로그 메시지(93, 138, 161, 164행)에서도 접두사를 제거하는 것을 권장합니다.
| logging.info(f"[worker] start consumer={settings.CONSUMER_NAME} group={settings.GROUP_NAME} stream={settings.STREAM_JOB}") | |
| logging.info(f"start consumer={settings.CONSUMER_NAME} group={settings.GROUP_NAME} stream={settings.STREAM_JOB}") |
|
Gemini 코드 리뷰 중 오류가 발생했습니다: 404 models/gemini-1.5-pro-latest is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods. |
|
안녕하세요 @youyeon11님, 오류 보고 감사합니다. "404 models/gemini-1.5-pro-latest is not found" 메시지는 Gemini 시스템 내부에서 모델을 찾거나 지원하는 데 문제가 발생했음을 나타냅니다. 이는 사용자 측에서 해결할 수 있는 문제가 아니며, 저희 시스템의 일시적인 문제일 수 있습니다. 이 문제를 보고해주셔서 감사합니다. 이 피드백은 서비스 개선에 큰 도움이 됩니다. 현재로서는 제가 직접 이 문제를 해결할 수는 없지만, 문제가 해결되면 다시 코드 리뷰를 지원해 드릴 수 있습니다. |
📌 작업 목적
기존에 간단히 print로만 콘솔에서 확인하던 것을
logging 라이브러리를 통하여 어플리케이션 관리 차원의 로깅으로 변경
🗂 작업 유형
🔨 주요 작업 내용
logging_config.py🧪 테스트 결과
📎 관련 이슈