Skip to content

Commit e97ce23

Browse files
knisarmdlinville
andauthored
Update Weave Models Integration tutorial with Registry backlink (#1238)
## Description of the change Updating the docs with changes to have the Registry backlink generate in Weave The Colab linked already has the code changes, wanted to get this tutorial in line with the Colab changes --------- Co-authored-by: Matt Linville <matt.linville@wandb.com>
1 parent f17771d commit e97ce23

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

content/tutorials/weave_models_registry.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ class UnslothLoRAChatModel(weave.Model):
8484
_tokenizer: Any = PrivateAttr()
8585

8686
def model_post_init(self, __context):
87-
# paste this from the "Use" tab from the registry
8887
run = wandb.init(project=PROJECT, job_type="model_download")
89-
artifact = run.use_artifact(f"{self.chat_model}")
88+
artifact_ref = self.chat_model.replace("wandb-artifact:///", "")
89+
artifact = run.use_artifact(artifact_ref)
9090
model_path = artifact.download()
9191

9292
# unsloth version (enable native 2x faster inference)
@@ -126,7 +126,9 @@ class UnslothLoRAChatModel(weave.Model):
126126
Now create a new model with a specific link from the registry:
127127

128128
```python
129-
MODEL_REG_URL = "wandb32/wandb-registry-RAG Chat Models/Finetuned Llama-3.2:v3"
129+
ORG_ENTITY = "wandb32" # replace this with your organization name
130+
artifact_name = "Finetuned Llama-3.2" # replace this with your artifact name
131+
MODEL_REG_URL = f"wandb-artifact:///{ORG_ENTITY}/wandb-registry-RAG Chat Models/{artifact_name}:v3"
130132

131133
max_seq_length = 2048
132134
dtype = None

0 commit comments

Comments
 (0)