Skip to content

Commit

Permalink
feat: get untrusted types from blob
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Szyszkowski committed Nov 13, 2024
1 parent d71492a commit 0f6f439
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gentropy/method/l2g/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def load_from_disk(cls: Type[LocusToGeneModel], path: str) -> LocusToGeneModel:
client = storage.Client()
bucket = storage.Bucket(client=client, name=bucket_name)
blob = storage.Blob(name=blob_name, bucket=bucket)
loaded_model = sio.loads(blob.download_as_string(client=client))
data = blob.download_as_string(client=client)
loaded_model = sio.loads(data, trusted=sio.get_untrusted_types(data=data))
else:
loaded_model = sio.load(path, trusted=sio.get_untrusted_types(file=path))

Expand Down

0 comments on commit 0f6f439

Please sign in to comment.