Add flow to ask for consent to share learnings – finally (#471)

* Consent flow

* Fix pre-commit

* Fix ruff

* Remove codespell

* Remove codespell fully

* whitespace
This commit is contained in:
Anton Osika
2023-07-02 19:17:15 +02:00
committed by GitHub
parent 1b232cd640
commit 2b8e056d5d
7 changed files with 66 additions and 20 deletions

View File

@@ -1,5 +1,4 @@
import hashlib
import os
from typing import List
@@ -23,10 +22,6 @@ def send_learning(learning: Learning):
def collect_learnings(model: str, temperature: float, steps: List[Step], dbs: DBs):
if os.environ.get("COLLECT_LEARNINGS_OPT_IN") in ["false", "1"]:
print("COLLECT_LEARNINGS_OPT_IN is set to false, not collecting learning")
return
learnings = extract_learning(
model, temperature, steps, dbs, steps_file_hash=steps_file_hash()
)