Spaces:
Sleeping
Sleeping
Commit
·
d2d70ce
1
Parent(s):
2271ca4
bugfix: fix minor bugs
Browse files
utils/completion_reward.py
CHANGED
@@ -48,9 +48,10 @@ class CompletionReward:
|
|
48 |
"mtk": self.paragraph_mtk,
|
49 |
}
|
50 |
SERVICE_ACCOUNT_INFO = os.getenv("GBQ_TOKEN")
|
|
|
51 |
service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
52 |
|
53 |
-
creds = Credentials.from_service_account_info(service_account_info_dict)
|
54 |
self.gbq_client = bigquery.Client(
|
55 |
credentials=creds, project=service_account_info_dict["project_id"]
|
56 |
)
|
|
|
48 |
"mtk": self.paragraph_mtk,
|
49 |
}
|
50 |
SERVICE_ACCOUNT_INFO = os.getenv("GBQ_TOKEN")
|
51 |
+
SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
|
52 |
service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
53 |
|
54 |
+
creds = Credentials.from_service_account_info(service_account_info_dict, scopes=SCOPES)
|
55 |
self.gbq_client = bigquery.Client(
|
56 |
credentials=creds, project=service_account_info_dict["project_id"]
|
57 |
)
|