> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-serverless-sft-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 오브젝트 추적 및 버전 관리

> thought Weave 에서 JSON 직렬화가 가능한 모든 오브젝트 를 추적하고 버전 관리하세요

## 오브젝트 게시하기

Weave 의 직렬화 레이어는 오브젝트를 저장하고 버전을 관리합니다.

<Tabs>
  <Tab title="Python">
    ```python lines theme={null}
    import weave
    # 'intro-example' 프로젝트에 대한 트래킹 초기화
    weave.init('intro-example')
    # 리스트를 저장하고 'cat-names'라는 이름을 부여함
    weave.publish(['felix', 'jimbo', 'billie'], 'cat-names')
    ```
  </Tab>

  <Tab title="TypeScript">
    TypeScript 에서의 게시는 아직 초기 단계이므로, 모든 오브젝트가 완전히 지원되지는 않습니다.

    ```typescript lines theme={null}
    import * as weave from 'weave'

    // 'intro-example' 프로젝트에 대한 트래킹 초기화
    const client = await weave.init('intro-example')

    // 배열을 저장하고 'cat-names'라는 이름을 부여함
    client.publish(['felix', 'jimbo', 'billie'], 'cat-names')
    ```
  </Tab>
</Tabs>

이름을 지정하여 오브젝트를 저장하면, 해당 오브젝트가 존재하지 않을 경우 첫 번째 버전이 생성됩니다.

## 오브젝트 다시 가져오기

<Tabs>
  <Tab title="Python">
    `weave.publish` 는 Ref 를 반환합니다. 모든 Ref 에 대해 `.get()` 을 호출하여 오브젝트를 다시 가져올 수 있습니다.

    Ref 를 생성한 다음 오브젝트를 페치(fetch)할 수 있습니다.

    ```python lines theme={null}
    weave.init('intro-example')
    cat_names = weave.ref('cat-names').get()
    ```
  </Tab>

  <Tab title="TypeScript">
    ```plaintext theme={null}
    이 기능은 아직 TypeScript에서 지원되지 않습니다.
    ```
  </Tab>
</Tabs>

## 오브젝트 삭제하기

<Tabs>
  <Tab title="Python">
    오브젝트의 버전을 삭제하려면, 오브젝트 Ref 에 대해 `.delete()` 를 호출하세요.

    ```python lines theme={null}
    weave.init('intro-example')
    cat_names_ref = weave.ref('cat-names:v1')
    cat_names_ref.delete()
    ```

    삭제된 오브젝트에 엑세스하려고 하면 오류가 발생합니다. 삭제된 오브젝트를 참조하는 오브젝트를 확인(resolve)하려고 하면 삭제된 오브젝트 대신 `DeletedRef` 오브젝트가 반환됩니다.
  </Tab>

  <Tab title="TypeScript">
    ```plaintext theme={null}
    이 기능은 아직 TypeScript에서 지원되지 않습니다.
    ```
  </Tab>
</Tabs>

## Ref 스타일

정규화된(Fully qualified) Weave 오브젝트 Ref URI 는 다음과 같습니다:

```
weave://<entity>/<project>/object/<object_name>:<object_version>
```

* *entity*: wandb entity (사용자 이름 또는 팀)
* *project*: wandb project
* *object\_name*: 오브젝트 이름
* *object\_version*: 버전 해시, v0, v1... 과 같은 문자열, 또는 ":latest" 와 같은 에일리어스. 모든 오브젝트는 ":latest" 에일리어스를 가집니다.

Ref 는 다음과 같은 몇 가지 스타일로 구성할 수 있습니다:

* `weave.ref(<name>)`: `weave.init(<project>)` 호출이 필요합니다. ":latest" 버전을 참조합니다.
* `weave.ref(<name>:<version>)`: `weave.init(<project>)` 호출이 필요합니다.
* `weave.ref(<fully_qualified_ref_uri>)`: weave.init 을 호출하지 않고도 구성할 수 있습니다.
