hltcoe / patapsco

Cross language information retrieval pipeline
Other
18 stars 6 forks source link

config error on demo-ecir.ipynb #44

Closed andreaschari closed 2 years ago

andreaschari commented 2 years ago

When running the Probabilistic Structured Query example on the demo notebook the cell crashes with the following traceback:

ValidationError                           Traceback (most recent call last)
~/.local/lib/python3.7/site-packages/patapsco/config.py in create_config_object(config_class, config_dict)
     81         try:
---> 82             return config_class(**config_dict)
     83         except pydantic.ValidationError as error:

~/.local/lib/python3.7/site-packages/pydantic/main.cpython-37m-x86_64-linux-gnu.so in pydantic.main.BaseModel.__init__()

ValidationError: 1 validation error for RunnerConfig
topics -> input -> filter_lang
  extra fields not permitted (type=value_error.extra)

During handling of the above exception, another exception occurred:

ConfigError                               Traceback (most recent call last)
<ipython-input-7-b2e000c7d072> in <module>
     64 }
     65 
---> 66 runner = patapsco.Runner(config_psq)
     67 runner.run()

~/.local/lib/python3.7/site-packages/patapsco/run.py in __init__(self, config, debug, overrides, job_type, **kwargs)
     30         else:
     31             # using a config dictionary
---> 32             conf = ConfigHelper.prepare(copy.deepcopy(config), overrides)
     33         LOGGER.info(f"Writing output to: {pathlib.Path(conf.run.path).absolute()}")
     34         if job_type == JobType.NORMAL:

~/.local/lib/python3.7/site-packages/patapsco/helpers.py in prepare(cls, config_dict, overrides)
     24         cls._validate_dict(config_dict)
     25         cls._set_run_path(config_dict)
---> 26         conf = config_service.create_config_object(RunnerConfig, config_dict)
     27         cls._update(conf)
     28         cls._validate_obj(conf)

~/.local/lib/python3.7/site-packages/patapsco/config.py in create_config_object(config_class, config_dict)
     94                 else:
     95                     error_msg += f"\n  {field} - {error_type}"
---> 96             raise ConfigError(error_msg)
     97 
     98     def read_config_file(self, filename):

ConfigError: 1 validation errors in configuration
  topics.input.filter_lang - unknown field

I cannot find any definitions for "filter_lang" in the source code anywhere

cash commented 2 years ago

@andreaschari sorry about that. Looks like we changed the schema without updating the notebook. The field was renamed as "qrels_lang" as we felt that was more descriptive (only run on the topics that have qrels for that language).

andreaschari commented 2 years ago

ahh ok yeah that makes sense thank you

eugene-yang commented 2 years ago

Updated the notebook. It should be fixed now. Please reopen this issue if the configuration dictionary still throws an exception.