File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# /// script
22# dependencies = [
3- # "trackio>=0.22.0 ",
3+ # "trackio>=0.21.1 ",
44# "datasets>=4.4.0",
55# "transformers[torch]>=5.0.0rc2",
66# "huggingface_hub>=1.0.0",
1515 Trainer ,
1616 TrainingArguments ,
1717)
18+ import random
1819
20+ suffix = random .randint (100000 , 999999 )
1921model_name = "distilbert-base-uncased"
2022tokenizer = AutoTokenizer .from_pretrained (model_name )
2123model = AutoModelForSequenceClassification .from_pretrained (model_name , num_labels = 2 )
2729dataset = Dataset .from_dict ({** encodings , "labels" : labels })
2830
2931username = huggingface_hub .whoami (cache = True )["name" ]
30- hub_model_id = f"{ username } /trackio-transformers-demo"
32+ hub_model_id = f"{ username } /trackio-transformers-demo- { suffix } "
3133
3234# Local Trackio logs by default; the first Hub push runs sync(sdk="static") and links the dashboard on the model card.
3335
4042 learning_rate = 2e-5 ,
4143 logging_steps = 1 ,
4244 report_to = "trackio" ,
43- project = "trackio-transformers-demo" ,
45+ project = f "trackio-transformers-demo- { suffix } " ,
4446 push_to_hub = bool (hub_model_id ),
4547 hub_model_id = hub_model_id ,
4648 ),
You can’t perform that action at this time.
0 commit comments