Skip to content

Commit

Permalink
re add Task
Browse files Browse the repository at this point in the history
  • Loading branch information
horheynm committed Apr 17, 2024
1 parent 2fb5693 commit 9034963
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/sparseml/transformers/test_clear_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@

from pathlib import Path

import torch

from clearml import Task
from sparseml.transformers import apply


def test_oneshot_and_finetune(tmp_path: Path):
recipe_str = "tests/sparseml/transformers/finetune/test_alternate_recipe.yaml"
model = "Xenova/llama2.c-stories15M"
device = "cuda:0"
if not torch.cuda.is_available():
device = "cpu"
dataset = "wikitext"
dataset_config_name = "wikitext-2-raw-v1"
concatenate_data = True
Expand All @@ -31,7 +36,7 @@ def test_oneshot_and_finetune(tmp_path: Path):

# clearML will automatically log default capturing entries without
# explicitly calling logger. Logs accessible in https://app.clear.ml/
# Task.init(project_name="test", task_name="test_oneshot_and_finetune")
Task.init(project_name="test", task_name="test_oneshot_and_finetune")

apply(
model=model,
Expand All @@ -43,4 +48,5 @@ def test_oneshot_and_finetune(tmp_path: Path):
max_steps=max_steps,
concatenate_data=concatenate_data,
splits=splits,
oneshot_device=device,
)

0 comments on commit 9034963

Please sign in to comment.