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 | |
from typing import List | |
from collections import defaultdict | |
import fugashi | |
import ipadic | |
class JaccardNLP: | |
def __init__(self): |
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
"""追加で実施した lm-evaluation-harness の結果を wandb に Upload する | |
注意事項: | |
- batch_size, commit_id は、lm-evaluation-harness の実行時のものを指定すること | |
- is_write_out もできれば lm-evaluation-harness の実行時のものを指定すること | |
- average は追加したタスクを反映させた結果が上書きされる | |
- artifact は追加で実施した lm-evaluation-harness の結果のみ Upload される(ただし、以前に実行した結果がローカルに残っている場合は、それも Upload される) | |
- 古い結果は wandb の UI 上で version を選択して確認する | |
""" | |
import argparse |
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
""" | |
Optuna example that optimizes a classifier configuration for Iris dataset using sklearn. | |
In this example, we optimize a classifier configuration for Iris dataset. Classifiers are from | |
scikit-learn. We optimize both the choice of classifier (among SVC and RandomForest) and their | |
hyperparameters. | |
""" | |
import mlflow |
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
""" | |
Optuna example that optimizes a classifier configuration for Iris dataset using sklearn. | |
In this example, we optimize a classifier configuration for Iris dataset. Classifiers are from | |
scikit-learn. We optimize both the choice of classifier (among SVC and RandomForest) and their | |
hyperparameters. | |
""" | |
import mlflow |
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 | |
# coding=utf-8 | |
# Copyright The HuggingFace Team and The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 | |
# coding=utf-8 | |
# Copyright 2020 The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 argparse | |
import os | |
import re | |
""" | |
convert brat2conll2003 (IOB1) | |
input: | |
input_text: brat text file; same basename + '.ann' is used as annotation file. | |
output_file: output file path converted to conll format | |
if not given, use input_text basename + '.conll03' |