Intradiction commited on
Commit
56ab5a8
1 Parent(s): 3a5b288

Programmatically access tfevents file from huggingface hub repo

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,6 +3,7 @@ from transformers import pipeline, AutoTokenizer, AutoModel, BertForSequenceClas
3
  from peft.auto import AutoPeftModelForSequenceClassification
4
  from tensorboard.backend.event_processing import event_accumulator
5
  from peft import PeftModel
 
6
  import plotly.express as px
7
  import pandas as pd
8
 
@@ -101,7 +102,8 @@ def displayMetricStatsText():
101
  return metrics
102
 
103
  def displayMetricStatsTextTCLora():
104
- file_name = 'events.out.tfevents.distilbertSA-LORA.0'
 
105
  event_acc = event_accumulator.EventAccumulator(file_name,
106
  size_guidance={
107
  event_accumulator.COMPRESSED_HISTOGRAMS: 500,
 
3
  from peft.auto import AutoPeftModelForSequenceClassification
4
  from tensorboard.backend.event_processing import event_accumulator
5
  from peft import PeftModel
6
+ from huggingface_hub import hf_hub_download
7
  import plotly.express as px
8
  import pandas as pd
9
 
 
102
  return metrics
103
 
104
  def displayMetricStatsTextTCLora():
105
+ #file_name = 'events.out.tfevents.distilbertSA-LORA.0'
106
+ file_name = hf_hub_download(repo_id="Intradiction/BERT-SA-LORA", filename="runs/Mar16_18-10-29_INTRADICTION/events.out.tfevents.1710627034.INTRADICTION.31644.0")
107
  event_acc = event_accumulator.EventAccumulator(file_name,
108
  size_guidance={
109
  event_accumulator.COMPRESSED_HISTOGRAMS: 500,