Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added string type conversion before encoding #38

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/internal/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def humanize_end_timestamp(self) -> datetime.datetime:
def _compute_hash(self) -> None:
"""Hash the config filename to uniquely identify experiments"""
if self.config_filename:
self.hash = self.config_filename.encode("utf-8")
self.hash = hashlib.sha256(usedforsecurity=False)
self.hash = self.hash.hexdigest()
hasher = hashlib.sha256(usedforsecurity=False)
hasher.update(str(self.config_filename).encode('utf-8'))
self.hash = hasher.hexdigest()

def _build_treatments(self) -> None:
"""Build a representation of treatments defined in config"""
Expand Down
Loading