Skip to content

Commit

Permalink
todo: vespa format for push to hub
Browse files Browse the repository at this point in the history
  • Loading branch information
sutyum committed Jan 15, 2024
1 parent 64bfe56 commit 2612b61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ragatouille/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random
import shutil
from pathlib import Path
from typing import Union
from typing import Optional, Union

import torch
import torch.nn as nn
Expand All @@ -25,9 +25,12 @@ def seeded_shuffle(collection: list, seed: int = 42):
def export_to_huggingface_hub(
colbert_path: Union[str, Path],
huggingface_repo_name: str,
index_path: Optional[str] = None,
export_vespa_onnx: bool = False,
use_tmp_dir: bool = False,
):
# TODO: If index_path is available, convert the index directory into Vespa Format (?) and push it too.

# ensure model contains a valid ColBERT config before exporting
colbert_config = ColBERTConfig.load_from_checkpoint(colbert_path)
try:
Expand Down

0 comments on commit 2612b61

Please sign in to comment.