-
Notifications
You must be signed in to change notification settings - Fork 282
[E3] 04-MODEL / 03-ModelSerialization #44
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
Conversation
[Title] Model Serialization [Version] initial [Language] ENG [Package] langchain_core, langchain-openai, pickle LangChain Serialization tutorial Describe what is serialization and some examples using load.dumps, load.loads, load.dumpd and load.load. And how to serialize to or deserialize from pickle file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Review]
- Review OS(Windows/Mac/Linux): Windows
- Template Rule 가이드를 준수 하였는가(YES/NO): Yes
- Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가?(YES/NO): Yes
- 이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가?(YES/NO): Yes
- import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가?(YES/NO): Yes
- 모든 코드가 동작에 오류 없이 동작하는가? (만약, warning 발생시 코멘트에 적어주세요): Yes
- 기타 의견:
6번의 경우 Serialization with pickle 섹션에서 dump과정 중, data 폴더가 없을 경우 pickle.dump 부분에서 오류가 발생합니다.
현재 프로젝트 상에선 fetch, merge 등을 통해 이미 data 폴더가 생성되어 있지만, 처음 시작하는 경우엔 data가 폴더가 없을 수 있으므로 폴더 구조나 os.makedirs('data', exist_ok=True) 등으로 폴더를 생성하는 과정을 추가하는 것이 좋을 것 같습니다.
[Title] Model Serialization [Version] Revision [Language] ENG [Package] langchain_core, langchain-openai, pickle LangChain Serialization tutorial Assurance of existing data folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정상 동작 및 변경 사항 확인하였습니다. 수고하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Review]
- Review OS : Mac
- Template Rule 가이드를 준수 하였는가 : YES
- Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가? : YES
- 이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가? : N/A(이미지 없음)
- import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가? : YES
- 모든 코드가 동작에 오류 없이 동작하는가? : YES
- 기타 의견: 가이드에 맞춰 잘 작업해주신 것 같습니다.
한글 튜토리얼보다 dumps, dumps 부분을 분리하고 테스트 결과를 확인 가능 했습니다.
수고 하셨습니다.
"# Create chain\n", | ||
"chain = prompt | llm" | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/teddylee777/langchain-kr/blob/main/04-Model/03-ModelSerialization.ipynb 의 내용처럼 직렬화가 가능한지 체크하는 부분 추가해도 좋을것 같습니다.
# Check if serialization is possible
print(f"ChatOpenAI: {ChatOpenAI.is_lc_serializable()}")
print(f"llm: {llm.is_lc_serializable()}")
print(f"chain: {chain.is_lc_serializable()}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Review]
Review OS(Windows/Mac/Linux): Mac
Template Rule 가이드를 준수 하였는가(YES/NO): Yes
Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가?(YES/NO): Yes
이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가?(YES/NO): Yes
import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가?(YES/NO): NO
모든 코드가 동작에 오류 없이 동작하는가? (만약, warning 발생시 코멘트에 적어주세요): Yes
기타 의견:
작업 하시느라 고생하셨습니다!
import 문에 대해서 최신 버전으로 업데이트만 해주시면 될거 같습니다!
[Title] Model Serialization [Version] initial [Language] ENG [Package] langchain_core, langchain-openai, pickle LangChain Serialization tutorial Clarify the limitation of 'is_lc_serializable' method and how to check serialized json can be deserialized without any error
[Version] initial [Language] ENG [Package] langchain_core, langchain-openai, pickle LangChain Serialization tutorial Update import source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
신하섬님께서 제안하신 부분 init.py 코드 봤을 땐 __all__로 불러와서 넘어갔었는데 수정하신 것 확인하였습니다. 수고하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정 확인 하였습니다. 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Review]
- Review OS : Mac
- Template Rule 가이드를 준수 하였는가 : YES
- Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가? : YES
- 이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가? : N/A(이미지 없음)
- import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가? : YES
- 모든 코드가 동작에 오류 없이 동작하는가? : YES
- 기타 의견: 가이드에 맞춰 잘 작업해주신 것 같습니다. 수고 하셨습니다. 👍
[Title] Model Serialization
[Version] initial
[Language] ENG
[Package] langchain_core, langchain-openai, pickle
LangChain Serialization tutorial
Describe what is serialization and some examples using load.dumps, load.loads, load.dumpd and load.load.
And how to serialize to or deserialize from pickle file.