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
# On a18, not using nccl backend resolves | |
torchrun --nproc-per-node 8 test_barrier.py | |
# On a18, using nccl backend hangs | |
torchrun --nproc-per-node 8 test_barrier.py --use_nccl | |
# On other nodes, this script never hangs | |
torchrun --nproc-per-node 8 test_barrier.py | |
torchrun --nproc-per-node 8 test_barrier.py --use_nccl |
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
Instructor.create(first_name: "Michael", last_name: "Psenka", title: "Lecturer") | |
Instructor.create(first_name: "Gopala", last_name: "Anumanchipalli", title: "Assistant Professor") | |
Instructor.create(first_name: "Igor", last_name: "Mordatch", title: "Assistant Professor") | |
Instructor.create(first_name: "Gasper", last_name: "Begus", title: "Assistant Professor") | |
Instructor.create(first_name: "Venkatesan", last_name: "Guruswami", title: "Assistant Professor") | |
Instructor.create(first_name: "Joe", last_name: "Hellerstein", title: "Professor") | |
start_time = DateTime.now - (12 / 24.0) # Past 12 hours | |
Instructorship.where("created_at >= (?)", start_time).destroy_all | |
Klass.where("created_at >= (?)", start_time).destroy_all |
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
to_add = [ | |
["Bob", "Joe", "Compserv"], | |
] | |
for data in to_add do | |
matched_people = People.where(first_name: data[0], last_name: data[1]) | |
end |
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
from typing import Dict, List | |
import csv | |
in_path = "../../../../Downloads/HKN Candidate RSVP Form (Fa22) (Responses) - Form Responses 1.csv" | |
out_path = "candidate_info.csv" | |
with open(in_path) as f: |
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
# Without vectorization | |
time python cs285/scripts/run_hw2.py \ | |
--exp_name q1_sb_no_rtg_dsa \ | |
--env_name CartPole-v0 \ | |
-n 10 \ | |
-b 10000 \ | |
--multiprocess_gym_envs 1 | |
# With vectorization | |
time python cs285/scripts/run_hw2.py \ |
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
Slot.where(room: Slot::Room::Cory, hour: 11, wday: 5).first.tutors.clear | |
Slot.where(room: Slot::Room::Cory, hour: 15, wday: 2).first.tutors.clear | |
Slot.where(room: Slot::Room::Cory, hour: 15, wday: 4).first.tutors.clear | |
Slot.where(room: Slot::Room::Cory, hour: 16, wday: 4).first.tutors.clear |
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
from collections import OrderedDict | |
import numpy as np | |
import time | |
from tqdm import trange | |
import gym | |
import torch | |
from cs285.infrastructure import pytorch_util as ptu | |
from cs285.infrastructure.logger import Logger |
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
cs_dept = Department.where(abbr: "COMPSCI").first() | |
info_dept = Department.create( | |
name: "Information", | |
abbr: "INFO", | |
) | |
# Create CS 194-26 and CS 294-26 | |
# For course information, see https://inst.eecs.berkeley.edu/~cs194-26/fa22/ | |
for course_number in [194, 294] do | |
Course.create( |