python pakage manage using uv
·
개발/파이썬
pyproject.toml 으로 uv 환경 생성uv syncuv 환경 활성화source .venv/bin/activateuv 환경 비활성화deactivatepython 코드 실행uv run [python 코드]
wsl 에서 USB 사용하기 | USB use in wsl, USB Mount
·
개발
wsl 에서 만든 파일이나 다운받은 파일을 USB에 옮겨야 할 때가 있다 explorer.exe 열어서 탐색기로 옮기면  넘 오래걸린다 그래서 USB를 wsl에 마운팅하여 써봤다 1. 폴더 만들기공식문서https://learn.microsoft.com/ko-kr/windows/wsl/wsl2-mount-disk#differences-between-mounting-an-external-drive-with-windows-formatting-versus-linux-formatting WSL 2에서 Linux 디스크 탑재 시작WSL 2에서 디스크 탑재를 설정하는 방법과 액세스하는 방법을 알아봅니다.learn.microsoft.com wsl 에서 /mnt 폴더에 들어가서 마운트할 폴더부터 만든다.권한 문제가 있으..
[Pydantic] langchain import Document Error
·
개발/파이썬
Errorfrom llama_index.core.bridge.langchain import Document위 코드에서 아래와 같은 에러 발생pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for typing.AsyncGenerator[str, NoneType]. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.If you got this error by calling handl..
Docker, k8s 간단 배포
·
개발/Infra
Cloud 환경(여기서는 NHN)이 어느정도 구축되어 있다는 가정하에 간단하게 배포하는 과정을 알아보자도커 이미지 생성 -> cloud image registry push -> k8s yaml 파일 작성 -> pod, service, ... 생성1. Docker image1. 이미지 생성docker buildx build -t : .이미지 삭제docker rmi 모든 이미지 삭제docker rmi $(docker images -q)2. 로컬 테스트이미지 실행docker run -p 8000:8000 :이미지 목록 확인docker images사용하지 않는 컨테이너, 네트워크 삭제docker system prune컨테이너 상태 확인실행중docker ps모든 컨테이너 (중지된 것 포함)docker ps -a컨..
[SQLModel] Composite Key 설정
·
개발/파이썬
데이터 구조object_idcol_nameOBJ00000000000000003시도OBJ00000000000000002시도OBJ00000000000000100시도문제 상황데이터 조회가 제대로 되지 않음.for row in session.query(DatalakeType1Columns).all(): logger.info(f"ID: {row.object_id}, ColName: {row.col_name}")위 코드에서, 내가 원하는 건 id 3, 2, 100에 대한 데이터를 모두 가져오는 것이었다.근데 3밖에 안가져와짐commit 하고 expire_all() 해봐도 마찬가지근데 DB 에는 제대로 데이터가 모두 들어가 있다.object_id, col_name 을 복합키로 인식하지 않고 col..
Langchain mulltiple edges error, Graph Parallel Processing
·
개발/파이썬
Error MessageValueError: Already found path for node 'make_keyword'.For multiple edges, use StateGraph with an annotated state key.My Graphdef CompilingGraph(): workflow = StateGraph(AgentState) # Make keyword workflow.add_node("make_keyword", RunHCXRewrite) # generate_prompt # Data Search workflow.add_node("retrieve_api_desc", RetriveAPIDesc) workflow.add_node("retrieve_api_t..
PGVector Insert using SQLModel
·
개발/파이썬
원래 langchain 패키지에 PGVector 클래스를 사용했었는데뭔가 오류가 남SQLModel 선언해서 직접 넣어보자define Modelclass LangchainEmbedding(SQLModel, table=True): __tablename__ = 'langchain_pg_embedding' class Config: arbitrary_types_allowed = True id: str = Field(primary_key=True) collection_id: uuid.UUID = None embedding: Any = Field(sa_column=Column(Vector(1024))) document: str = None cmetadata: Any ..
Chakra UI 설치 오류
·
개발/REACT
공식문서에서 시키는 대로 다했다. 근데오류일단 화면이 안나옴아래는 콘솔창 에러Uncaught TypeError: Cannot read properties of undefined (reading '_config')The above error occurred in the component:at ChakraProvider ([http://localhost:3000/static/js/bundle.js:44907:12](http://localhost:3000/static/js/bundle.js:44907:12)) at AppConsider adding an error boundary to your tree to customize error handling behavior. Visit [https://react..
azure-cognitiveservices-speech 에러
·
개발
[29/Jun/2023 20:53:26] "POST /pronunce/word/ HTTP/1.1" 500 102618 Internal Server Error: /pronunce/word/ Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-pa..
대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
·
개발
kombu.exceptions.OperationalError: [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다. 같은 vs code 터미널에서 클라이언트와 서버가 통신할 때 나타나는 오류 같다. rabbitmq 를 설치해준다. RabbitMQ는 오픈 소스 메시지 브로커 소프트웨어, 메시지 브로커는 다른 시스템 간에 데이터를 안전하고 효율적으로 교환하는 역할 1. 파워쉘을 관리자 권한으로 열어줌 2. choco install rabbitmq 입력 3. [ 에러 ] script 파일 실행 권한에러 power shell 관리자 권한 이 시스템에서 스크립트를 실행할 수 없으므로 ~ Set-ExecutionPolicy RemoteSigned 로 실행 권한 부여해주면 됨 4. ..