This file contains hidden or 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
#!/bin/bash | |
# This should be run from the /ios directory of your project | |
rm Podfile.lock | |
rm -rf Pods | |
rm -rf ~/Library/Caches/CocoaPods | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
pod cache clean --all | |
pod install |
This file contains hidden or 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
import signal | |
from contextlib import contextmanager | |
from typing import Any, Generator | |
class TimeoutException(Exception): | |
"""Raised when a timeout occurs.""" | |
pass |
This file contains hidden or 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
def save_tensors_to_pickle(output_file: str, to_numpy: bool, **kwargs) -> None: | |
"""Save tensors to pickle file. | |
Example usage: | |
``` | |
save_tensors_to_pickle( | |
"train_output.pkl", | |
to_numpy=False, | |
inputs=inputs, | |
logits=logits, |