<jupyter_start><jupyter_text>Setup<jupyter_code>from specific import *<jupyter_output><empty_output><jupyter_text>Retrieve previous results from the 'model' notebook<jupyter_code>X_train, X_test, y_train, y_test = data_split_cache.load()
rf = get_model()<jupyter_output><empty_output><jupyter_text>Get Dask Client<jupyter_code>def print_path():
    import sys

    return sys.path


client.submit(print_path).result()
# client.scheduler_info()['workers']['tcp://10.149.10.103:40991']
def p2():
    import wildfires

    return str(wildfires)


for worker in client.scheduler_info()["workers"]:
    # print(worker)
    # print(client.submit(print_path, pure=False, workers={worker}).result())
    try:
        print(client.submit(p2, pure=False, workers={worker}).result())
    except:
        print("Failed:", worker)
client.restart()
# client = Client(n_workers=1, threads_per_worker=8, resources={'threads': 8})
client = get_client()
client<jupyter_output><empty_output><jupyter_text>Dask LOCO<jupyter_code>loco_cache = SimpleCache("loco_results", cache_dir=CACHE_DIR)

leave_out = [""]
leave_out.extend(X_train.columns)

# XXX:
# loco_cache.clear()


@loco_cache
def get_loco_scores():
    return dict(
        dask_fit_loco(
            rf, X_train, y_train, client, leave_out, local_n_jobs=31, verbose=True
        )
    )


scores = get_loco_scores()
scores<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1363962670495334, 'fraction_numerical': 0.015793251974156496, 'mean_word_length': 5.669856459330144, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '621897', 'license': 'MIT', 'n_tokens_mistral': 527, 'n_tokens_neox': 500, 'n_words': 78, 'path': 'analyses/seasonality_paper_nn/all/model_analysis_loco.ipynb', 'repo_name': 'akuhnregnier/fuel-build-up', 'size': '1393'}