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

the sorting keys? #3

Open
charosen opened this issue Feb 6, 2020 · 3 comments
Open

the sorting keys? #3

charosen opened this issue Feb 6, 2020 · 3 comments

Comments

@charosen
Copy link

charosen commented Feb 6, 2020

Hi:

Thanks for the awesome contributions.

I notice there is sorting keys params in your config, but it seems like _create_batches of BagIterator doesn't use those keys to sort Bags/Instances in your repo.

So I wonder if you actually implement the sorting. If you do, how do you implement the sorting?

@charosen
Copy link
Author

charosen commented Feb 12, 2020

Hi, @ChristophAlt

I have difficulty in reproducing result auc 0.422 provided by your Trained Models.

I train the model in your repo via model_paper.json, and can only get the result auc 0.413, with following settings:

  1. nyt data: Google Drive or Tsinghua Cloud
  2. Python 3.6.8
  3. AllenNLP 0.7.1
  4. Pytorch 1.0.1
  5. Spacy 2.0.18
  6. en_core_web_sm 2.2.5

Also, i notice your Trained Model's vocabulary contain 58 relations, not 53 relations. Could you share:

  • how do you preprocess nyt data ?
  • Your exact settings (spacy, en_core_web_sm version) and hyperparameters (it seems like hyperparameters in your repo don't match your paper).

@ssnvxia
Copy link

ssnvxia commented Jun 29, 2020

Hi, @ChristophAlt

您好,我无法运行这个代码,按照作者提示输入训练命令之后会报错
Traceback (most recent call last):
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/run.py", line 18, in
main(prog="allennlp")
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/commands/init.py", line 72, in main
args.func(args)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/commands/train.py", line 111, in train_model_from_args
args.force)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/commands/train.py", line 142, in train_model_from_file
return train_model(params, serialization_dir, file_friendly_logging, recover, force)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/commands/train.py", line 282, in train_model
all_datasets = datasets_from_params(params)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/commands/train.py", line 149, in datasets_from_params
dataset_reader = DatasetReader.from_params(params.pop('dataset_reader'))
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/common/from_params.py", line 274, in from_params
return subclass.from_params(params=params, **extras)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/common/from_params.py", line 285, in from_params
kwargs = create_kwargs(cls, params, **extras)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/common/from_params.py", line 182, in create_kwargs
value_dict[key] = value_cls.from_params(params=value_params, **extras)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/common/from_params.py", line 274, in from_params
return subclass.from_params(params=params, **extras)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/site-packages/allennlp/common/from_params.py", line 287, in from_params
return cls(**kwargs) # type: ignore
File "/home/mxl/sym/TFRE/tre/byte_pair_indexer.py", line 67, in init
encoder_name = next(m.name for m in tmp.getmembers() if 'encoder_bpe' in m.name)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/tarfile.py", line 1759, in getmembers
self._load() # all members, we first have to
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/tarfile.py", line 2356, in _load
tarinfo = self.next()
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/tarfile.py", line 2287, in next
self.fileobj.seek(self.offset - 1)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/gzip.py", line 368, in seek
return self._buffer.seek(offset, whence)
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/_compression.py", line 143, in seek
data = self.read(min(io.DEFAULT_BUFFER_SIZE, offset))
File "/home/mxl/package/yes/envs/python3.6.6/lib/python3.6/gzip.py", line 482, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached

可否麻烦您把您运行的代码发给我一份呢?

@ssnvxia
Copy link

ssnvxia commented Jun 29, 2020

Hi, @ChristophAlt哈哈哈,不用了,代码已经跑起来了,是因为版本问题。

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