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
ELECTION TODAY | |
Base frac dem: 0.5156333333333334 | |
Winning maps: | |
Unique sets 255 | |
states, P(D_wins_states), P(D_win_states ∩ D_win_nationally), P(D_win_states | D_win_nationally), P(D_win_nationally | D_win_states) | |
{MI}, 58.0%, 48.0%, 93.0%, 82.7% | |
{PA}, 53.2%, 47.4%, 91.8%, 89.0% | |
{WI}, 56.7%, 46.4%, 90.0%, 81.8% | |
{MI, PA}, 46.4%, 44.8%, 86.9%, 96.6% | |
{MI, WI}, 48.4%, 44.1%, 85.6%, 91.2% |
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
{ | |
"attention_probs_dropout_prob": 0.1, | |
"directionality": "bidi", | |
"hidden_act": "gelu", | |
"hidden_dropout_prob": 0.1, | |
"hidden_size": 1024, | |
"initializer_range": 0.02, | |
"intermediate_size": 4096, | |
"max_position_embeddings": 512, | |
"num_attention_heads": 16, |
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
from pathlib import Path | |
from tqdm import tqdm | |
import pandas as pd | |
# Get the manifests from gs://cubert/20200621_Python/github_python_minus_ethpy150open_deduplicated_manifest | |
cubert_py_manifests_root = Path("REPLACE_WITH_PATH_WHERE_DOWNLOAD_MANIFESTS") | |
def get_manifest_df(num_files_limit: int = None) -> pd.DataFrame: | |
all_manifests = list(cubert_py_manifests_root.iterdir()) | |
taken_manifests = all_manifests[:min(num_files_limit or 999999, len(all_manifests))] |
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
"""This code tries to address the desire to have different forwards with | |
different signatures and supporting static analysis / IDE hinting. | |
Example: | |
class MyModule(MultiforwardTorchModule): | |
@add_hooks | |
def forward_train( | |
hidden_state: torch.Tensor, | |
teacher_force_seq: List[str] | |
# training specific args... |