Skip to content

TypeError: create_run_config() got an unexpected keyword argument 'shard_to_cpu' #168

@william-vw

Description

@william-vw

I just tried running the tests using sudo python setup.py test and got the following error, which is seems related to the fact that the shard_to_cpu parameter was removed a while ago. After removing the referred line in g2p_trainer_utils.py it works fine.

test_decode (tests.g2p_unittest.TestG2P) ... ERROR
test_evaluate (tests.g2p_unittest.TestG2P) ... ERROR
test_train (tests.g2p_unittest.TestG2P) ... ERROR

======================================================================
ERROR: test_decode (tests.g2p_unittest.TestG2P)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/william/speech/sphinx/g2p-seq2seq/tests/g2p_unittest.py", line 34, in test_decode
    g2p_model = G2PModel(params, test_path=decode_file_path)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 89, in __init__
    self.__prepare_model()
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 102, in __prepare_model
    self.params)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p_trainer_utils.py", line 230, in create_run_config
    use_tpu=params.use_tpu)
TypeError: create_run_config() got an unexpected keyword argument 'shard_to_cpu'

======================================================================
ERROR: test_evaluate (tests.g2p_unittest.TestG2P)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/william/speech/sphinx/g2p-seq2seq/tests/g2p_unittest.py", line 47, in test_evaluate
    g2p_model = G2PModel(params, test_path=gt_path)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 89, in __init__
    self.__prepare_model()
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 102, in __prepare_model
    self.params)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p_trainer_utils.py", line 230, in create_run_config
    use_tpu=params.use_tpu)
TypeError: create_run_config() got an unexpected keyword argument 'shard_to_cpu'

======================================================================
ERROR: test_train (tests.g2p_unittest.TestG2P)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/william/speech/sphinx/g2p-seq2seq/tests/g2p_unittest.py", line 23, in test_train
    test_path=dev_path)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 77, in __init__
    self.__prepare_model(train_mode=True)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p.py", line 102, in __prepare_model
    self.params)
  File "/home/william/speech/sphinx/g2p-seq2seq/g2p_seq2seq/g2p_trainer_utils.py", line 230, in create_run_config
    use_tpu=params.use_tpu)
TypeError: create_run_config() got an unexpected keyword argument 'shard_to_cpu'

----------------------------------------------------------------------
Ran 3 tests in 0.002s

FAILED (errors=3)
Test failed: <unittest.runner.TextTestResult run=3 errors=3 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=3 errors=3 failures=0>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions