Experiment data from the moolib whitepaper.
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
https://cdn.shopify.com/s/files/1/0317/7116/4804/files/Rasur_Guide_Updated_2022_komprimiert.pdf |
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
""" | |
Repro for ownership issue with Python stores for torch.distributed. | |
rm -rf /tmp/store_bug; for i in {0..1}; do python -u store_bug.py $i 2 & done && wait | |
""" | |
import os | |
import datetime | |
import sys | |
import time |
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
import os | |
import sys | |
import ctypes | |
ld = ctypes.CDLL(None, use_errno=True) | |
SPLICE_F_NONBLOCK = getattr(os, "SPLICE_F_NONBLOCK", 0x02) | |
def tee(fd_in, fd_out, length, flags=SPLICE_F_NONBLOCK): |
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
import os | |
import sys | |
try: | |
from _posixshmem import shm_open, shm_unlink | |
except ImportError: | |
import ctypes | |
dllname = None | |
if sys.platform.startswith("linux"): |
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
import contextlib | |
import fcntl | |
import os | |
import sys | |
import termios | |
import tty | |
@contextlib.contextmanager | |
def no_echo(): |
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
import queue | |
import threading | |
import gym | |
def target(resetqueue, readyqueue): | |
while True: | |
env = resetqueue.get() | |
if env is None: |
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
#!/usr/bin/env python | |
""" | |
Script for plotting results. | |
``` | |
python plot.py logs.tsv | |
``` | |
""" | |
import argparse | |
import glob |
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
import ctypes | |
import os | |
import time | |
def _sendfile(trgt_fd, src_fd): | |
# Cf. https://github.com/python/cpython/blob/3.8/Lib/shutil.py#L114 | |
# which we cannot easily use directly. | |
try: | |
blocksize = max(os.fstat(src_fd).st_size, 2 ** 23) # min 8MiB |
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
import collections | |
import sys | |
import pprint | |
class Entry: | |
pass | |
def load_file(filename): |
NewerOlder