Skip to content

Instantly share code, notes, and snippets.

View CoderPat's full-sized avatar

Patrick Fernandes CoderPat

View GitHub Profile
#!/bin/bash
# dummy script to simulate the slurm
# parse and ignore slurm arguments
# FIXME: add more arguments
while [ $# -gt 0 ]; do
case "$1" in
--nodelist=*)
;;
@CoderPat
CoderPat / get_free_gpu
Created March 1, 2021 13:15
Scripts to get first available gpu based on `nvidia-smi`
#!/bin/bash
gpu=$(python get_free_gpu.py $@)
until [ ! -z "$gpu" ]
do
sleep 5
gpu=$(python get_free_gpu.py $@)
done
echo $gpu
@CoderPat
CoderPat / experimental-submitters
Last active November 29, 2021 23:09
Experimental submitters for ducttape
# Experimental Submitters for Ducttape
import argparse
from math import prod
sensitivity = 0.42
specificity = 0.984
p_t = [[specificity, 1 - sensitivity], [1 - specificity, sensitivity]]
if __name__ == "__main__":
parser = argparse.ArgumentParser()
Code used for the 11-724's Homework 7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CoderPat
CoderPat / megatron_pretraining.tape
Created November 3, 2023 12:40
Example Ducttape Pipeline that uses Megatron-DeepSpeed
import "submitters/scslurm.tape"
task DumpHFDataset
> dataset_json=dataset.json
:: dataset_name=@
:: dataset_path=@
:: dataset_dirs=@
:: dataset_stream=@
:: filter=@
:: percentile=@