Hub Python Library documentation

토론 및 Pull Request와 상호 작용하기

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

토론 및 Pull Request와 상호 작용하기

Hub에서 Pull Requests와 Discussions와 상호 작용할 수 있는 메서드의 참조는 HfApi 문서 페이지를 확인하세요.

데이터 구조

class huggingface_hub.Discussion

< >

( title: strstatus: typing.Literal['open', 'closed', 'merged', 'draft']num: intrepo_id: strrepo_type: strauthor: stris_pull_request: boolcreated_at: datetimeendpoint: str )

매개변수

  • title (str) — Discussion / Pull Request의 제목
  • status (str) — Discussion / Pull Request의 상태입니다. 다음 중 하나여야 합니다:
    • "open"
    • "closed"
    • "merged" (Pull Requests에만 해당)
    • "draft" (Pull Requests에만 해당)
  • num (int) — Discussion / Pull Request의 번호입니다.
  • repo_id (str) — Discussion / Pull Request이 열려 있던 리포지토리의 id("{namespace}/{repo_name}")입니다.
  • repo_type (str) — Discussion / Pull Request이 열려 있던 repo의 유형입니다. 가능한 값은 다음과 같습니다: "model", "dataset", "space".
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • is_pull_request (bool) — 이것이 Pull Request인지 여부.
  • created_at (datetime) — Discussion / Pull Request의 생성 datetime입니다.
  • endpoint (str) — Hub의 Endpoint입니다. 기본값은 https://huggingface.co입니다.
  • git_reference (str, 선택 사항) — (property) 이 항목이 Pull Request인 경우 변경 사항을 push할 수 있는 Git reference이며, 그렇지 않으면 None입니다.
  • url (str) — (property) Hub에서 해당 토론의 URL입니다.

Hub의 Discussion 또는 Pull Request.

이 dataclass는 직접 인스턴스화하도록 설계되지 않았습니다.

class huggingface_hub.DiscussionWithDetails

< >

( title: strstatus: typing.Literal['open', 'closed', 'merged', 'draft']num: intrepo_id: strrepo_type: strauthor: stris_pull_request: boolcreated_at: datetimeendpoint: strevents: listconflicting_files: list[str] | bool | Nonetarget_branch: str | Nonemerge_commit_oid: str | Nonediff: str | None )

매개변수

  • title (str) — Discussion / Pull Request의 제목
  • status (str) — Discussion / Pull Request의 상태입니다. 다음 중 하나일 수 있습니다:
    • "open"
    • "closed"
    • "merged" (Pull Requests에만 해당)
    • "draft" (Pull Requests에만 해당)
  • num (int) — Discussion / Pull Request의 번호입니다.
  • repo_id (str) — Discussion / Pull Request이 열려 있던 리포지토리의 id("{namespace}/{repo_name}")입니다.
  • repo_type (str) — Discussion / Pull Request이 열려 있던 repo의 유형입니다. 가능한 값은 다음과 같습니다: "model", "dataset", "space".
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • is_pull_request (bool) — 이것이 Pull Request인지 여부.
  • created_at (datetime) — Discussion / Pull Request의 생성 datetime입니다.
  • events (list of DiscussionEvent) — 이 Discussion 또는 Pull Request에 포함된 DiscussionEvents 목록입니다.
  • conflicting_files (Union[list[str], bool, None], 선택) — Pull Request인 경우 충돌하는 파일 목록입니다. self.is_pull_request가 False인 경우 None입니다. 충돌하는 파일이 있지만 목록을 가져올 수 없는 경우 True입니다.
  • target_branch (str, 선택 사항) — Pull Request인 경우 변경 사항이 병합될 대상 브랜치입니다. self.is_pull_request가 False인 경우 None입니다.
  • merge_commit_oid (str, 선택 사항) — 이것이 병합된 Pull Request인 경우, 병합 커밋의 OID/SHA로 설정되며, 그렇지 않으면 None입니다.
  • diff (str, 선택 사항) — 이것이 Pull Request인 경우 git diff, 그렇지 않으면 None.
  • endpoint (str) — Hub의 Endpoint입니다. 기본값은 https://huggingface.co입니다.
  • git_reference (str, 선택 사항) — (property) 이 항목이 Pull Request인 경우 변경 사항을 push할 수 있는 Git reference이며, 그렇지 않으면 None입니다.
  • url (str) — (property) Hub에서 해당 토론의 URL입니다.

Discussion의 하위 클래스입니다.

클래스 huggingface_hub.DiscussionEvent

< >

( id: strtype: strcreated_at: datetimeauthor: str_event: dict )

매개변수

  • id (str) — 이벤트의 ID입니다. 16진수 문자열입니다.
  • type (str) — 이벤트의 유형입니다.
  • created_at (datetime) — 이벤트의 생성 시각을 담고 있는 datetime 객체입니다.
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.

Discussion 또는 Pull Request의 이벤트입니다.

구체적인 클래스를 사용하세요:

클래스 huggingface_hub.DiscussionComment

< >

( id: strtype: strcreated_at: datetimeauthor: str_event: dictcontent: stredited: boolhidden: bool )

매개변수

  • id (str) — 이벤트의 ID입니다. 16진수 문자열입니다.
  • type (str) — 이벤트의 유형입니다.
  • created_at (datetime) — 이벤트의 생성 시각을 담고 있는 datetime 객체입니다.
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • content (str) — 댓글의 원시 마크다운 콘텐츠입니다. 멘션, 링크 및 이미지는 렌더링되지 않습니다.
  • edited (bool) — 이 댓글이 수정되었는지 여부.
  • hidden (bool) — 이 댓글이 숨겨져 있는지 여부.

Discussion / Pull Request에 있는 댓글.

DiscussionEvent의 하위 클래스입니다.

class huggingface_hub.DiscussionStatusChange

< >

( id: strtype: strcreated_at: datetimeauthor: str_event: dictnew_status: str )

매개변수

  • id (str) — 이벤트의 ID입니다. 16진수 문자열입니다.
  • type (str) — 이벤트의 유형입니다.
  • created_at (datetime) — 이벤트의 생성 시각을 담고 있는 datetime 객체입니다.
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • new_status (str) — 변경 후 Discussion / Pull Request의 상태입니다. 다음 중 하나일 수 있습니다:
    • "open"
    • "closed"
    • "merged" (Pull Requests에만 해당)

Discussion / Pull Request의 상태 변경.

DiscussionEvent의 하위 클래스입니다.

class huggingface_hub.DiscussionCommit

< >

( id: strtype: strcreated_at: datetimeauthor: str_event: dictsummary: stroid: str )

매개변수

  • id (str) — 이벤트의 ID입니다. 16진수 문자열입니다.
  • type (str) — 이벤트의 유형입니다.
  • created_at (datetime) — 이벤트의 생성 시각을 담고 있는 datetime 객체입니다.
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • summary (str) — 커밋의 요약입니다.
  • oid (str) — 16진수 문자열로 표현된 커밋의 OID / SHA입니다.

Pull Request의 커밋.

DiscussionEvent의 하위 클래스입니다.

class huggingface_hub.DiscussionTitleChange

< >

( id: strtype: strcreated_at: datetimeauthor: str_event: dictold_title: strnew_title: str )

매개변수

  • id (str) — 이벤트의 ID입니다. 16진수 문자열입니다.
  • type (str) — 이벤트의 유형입니다.
  • created_at (datetime) — 이벤트의 생성 시각을 담고 있는 datetime 객체입니다.
  • author (str) — Discussion / Pull Request 작성자의 사용자 이름입니다. 해당 사용자가 이후에 삭제된 경우 "deleted"일 수 있습니다.
  • old_title (str) — Discussion / Pull Request의 이전 제목입니다.
  • new_title (str) — 새로운 제목입니다.

Discussion / Pull Request의 이름 변경 이벤트.

DiscussionEvent의 하위 클래스입니다.

Update on GitHub