forked from activeloopai/deeplake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f86e74d
commit af28e62
Showing
6 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import pickle # TODO: NEVER USE PICKLE | ||
import json | ||
|
||
from hub.core.typing import StorageProvider | ||
from hub.util.keys import get_dataset_meta_key | ||
|
||
|
||
def write_dataset_meta(storage: StorageProvider, meta: dict): | ||
storage[get_dataset_meta_key()] = pickle.dumps(meta) | ||
storage[get_dataset_meta_key()] = json.dumps(meta) | ||
|
||
|
||
def read_dataset_meta(storage: StorageProvider) -> dict: | ||
return pickle.loads(storage[get_dataset_meta_key()]) | ||
return json.loads(storage[get_dataset_meta_key()]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters