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

Error running validate_config from CLI #1851

Open
dzeber opened this issue Jul 20, 2023 · 0 comments
Open

Error running validate_config from CLI #1851

dzeber opened this issue Jul 20, 2023 · 0 comments

Comments

@dzeber
Copy link

dzeber commented Jul 20, 2023

I'm getting an error running validate_config locally from the CLI on certain experiment configs from metric-hub/jetstream. The error is attr.exceptions.NotAnAttrsClassError: <class 'NoneType'> is not an attrs-decorated class..

I tried running on a handful of experiment configs. All of these configs have been merged into metric-hub and so presumably the validation succeeded when running in CI.

  • I got this error for dynamic-wikipedia-suggestions.toml, firefox-suggest-by-merino-beta.toml, firefox-add-ons-suggestions-experiment.toml.
  • Ran without error: dictionary-addon-all-users.toml, mr2-upgrade-spotlight-holdback.toml

Steps to reproduce:

  • pull metric-hub main
  • create new venv and pip install mozilla-jetstream
$ jetstream validate_config dynamic-wikipedia-suggestions.toml
Evaluating dynamic-wikipedia-suggestions.toml...
Traceback (most recent call last):
  File "/Users/dzeber/git/metric-hub/jetstream/.env/bin/jetstream", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/jetstream/cli.py", line 1081, in validate_config
    call()
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/jetstream/config.py", line 283, in validate
    Analysis("no project", "no dataset", resolved_config).validate()
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/jetstream/analysis.py", line 439, in validate
    metrics.add(Metric.from_metric_config(metric_config.metric).to_mozanalysis_metric())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/jetstream/metric.py", line 67, in from_metric_config
    args["data_source"] = data_source.DataSource(**attr.asdict(metric_config.data_source))
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/attr/_funcs.py", line 53, in asdict
    attrs = fields(inst.__class__)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dzeber/git/metric-hub/jetstream/.env/lib/python3.11/site-packages/attr/_make.py", line 1944, in fields
    raise NotAnAttrsClassError(f"{cls!r} is not an attrs-decorated class.")
attr.exceptions.NotAnAttrsClassError: <class 'NoneType'> is not an attrs-decorated class.

Not sure if this is related, but I was previously running from inside a conda env, and it was failing on the same config files but with a different error: RecursionError: maximum recursion depth exceeded in comparison

┆Issue is synchronized with this Jira Task

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

1 participant