name: Bug Report
description: Create a report to help us reproduce and correct the bug
labels: ['Bug', 'Needs Triage']

body:
- type: markdown
  attributes:
    value: >
      #### Before submitting a bug, please make sure the issue hasn't been already
      addressed by searching through [the past issues](https://github.com/chenxingqiang/jax-sklearn/issues).
- type: textarea
  attributes:
    label: Describe the bug
    description: >
      A clear and concise description of what the bug is.
  validations:
    required: true
- type: textarea
  attributes:
    label: Steps/Code to Reproduce
    description: |
      Please add a [minimal code example](https://jax-sklearn.org/dev/developers/minimal_reproducer.html) that can reproduce the error when running it. Be as succinct as possible, **do not depend on external data files**: instead you can generate synthetic data using `numpy.random`, [xlearn.datasets.make_regression](https://jax-sklearn.org/stable/modules/generated/xlearn.datasets.make_regression.html), [xlearn.datasets.make_classification](https://jax-sklearn.org/stable/modules/generated/xlearn.datasets.make_classification.html) or a few lines of Python code. Example:

      ```python
      from xlearn.feature_extraction.text import CountVectorizer
      from xlearn.decomposition import LatentDirichletAllocation
      docs = ["Help I have a bug" for i in range(1000)]
      vectorizer = CountVectorizer(input=docs, analyzer='word')
      lda_features = vectorizer.fit_transform(docs)
      lda_model = LatentDirichletAllocation(
          n_topics=10,
          learning_method='online',
          evaluate_every=10,
          n_jobs=4,
      )
      model = lda_model.fit(lda_features)
      ```

      If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com.

      In short, **we are going to copy-paste your code** to run it and we expect to get the same result as you.

      We acknowledge that crafting a [minimal reproducible code example](https://jax-sklearn.org/dev/developers/minimal_reproducer.html) requires some effort on your side but it really helps the maintainers quickly reproduce the problem and analyze its cause without any ambiguity. Ambiguous bug reports tend to be slower to fix because they will require more effort and back and forth discussion between the maintainers and the reporter to pin-point the precise conditions necessary to reproduce the problem.
    placeholder: |
      ```
      Sample code to reproduce the problem
      ```
  validations:
    required: true
- type: textarea
  attributes:
    label: Expected Results
    description: >
      Please paste or describe the expected results.
    placeholder: >
      Example: No error is thrown.
  validations:
    required: true
- type: textarea
  attributes:
    label: Actual Results
    description: |
      Please paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full traceback** of the exception. For instance the code above raises the following exception:

      ```python-traceback
      ---------------------------------------------------------------------------
      TypeError                                 Traceback (most recent call last)
      <ipython-input-1-a674e682c281> in <module>
            4 vectorizer = CountVectorizer(input=docs, analyzer='word')
            5 lda_features = vectorizer.fit_transform(docs)
      ----> 6 lda_model = LatentDirichletAllocation(
            7     n_topics=10,
            8     learning_method='online',

      TypeError: __init__() got an unexpected keyword argument 'n_topics'
      ```
    placeholder: >
      Please paste or specifically describe the actual output or traceback.
  validations:
    required: true
- type: textarea
  attributes:
    label: Versions
    render: shell
    description: |
      Please run the following and paste the output below.
      ```python
      import xlearn; xlearn.show_versions()
      ```
  validations:
    required: true
- type: markdown
  attributes:
    value: >
      Thanks for contributing 🎉!
