Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predicted_topics_path yields either FileNotFoundError or IsADirectoryError #2

Closed
mhillebrand opened this issue Jun 27, 2021 · 2 comments

Comments

@mhillebrand
Copy link

What should I do about the predicted_topics_path entry in config_clustering.json? I have topic_level set to false, but predict.py still yields the following error.

python predict.py --config configs/config_clustering.json

gpu_num = [
  1
]
bert_model = "roberta-large"
hidden_layer = 1024
dropout = 0.3
with_mention_width = true
with_head_attention = true
embedding_dimension = 20
max_mention_span = 10
use_gold_mentions = false
mention_type = "mixed"
top_k = 0.25
split = "test"
training_method = "continue"
subtopic = false
use_predicted_topics = true
segment_window = 512
exact = false
topic_level = true
predicted_topics_path = "/home/mhillebrand/coref/data/predicted_topics"
data_folder = "data/ecb/mentions"
save_path = "models/pairwise_scorers"
model_path = "models/pairwise_scorers"
model_num = 9
keep_singletons = false
threshold = 44.27621788652271
linkage_type = "average"
Traceback (most recent call last):
  File "predict.py", line 94, in <module>
    data = create_corpus(config, bert_tokenizer, config.split, is_training=False)
  File "/home/mhillebrand/coref/utils.py", line 32, in create_corpus
    with open(config.predicted_topics_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/mhillebrand/coref/data/predicted_topics'

Then if I create the data/predicted_topics directory, I get this error:

IsADirectoryError: [Errno 21] Is a directory: '/home/mhillebrand/coref/data/predicted_topics'
@mhillebrand
Copy link
Author

Oh, duh. I just had to set use_predicted_topics to false.

@cccccs
Copy link

cccccs commented Dec 5, 2021

hi,can you get the good result about this code?my result is bad, the value of conll is 55,could you share your hyperparameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants