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

[DOCS] Fixes indentation in inference processor code snippet #51252

Merged
merged 3 commits into from
Jan 21, 2020

Conversation

szabosteve
Copy link
Contributor

@szabosteve szabosteve commented Jan 21, 2020

This PR fixes a wrongly indented line in a code snippet.

Preview available here: http://elasticsearch_51252.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/inference-processor.html

@szabosteve szabosteve added :Distributed Coordination/Task Management Issues for anything around the Tasks API - both persistent and node level. :ml Machine learning >docs General docs changes v7.6.1 v7.7.0 v8.0.0 labels Jan 21, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Task Management)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@szabosteve szabosteve removed the :Distributed Coordination/Task Management Issues for anything around the Tasks API - both persistent and node level. label Jan 21, 2020
@joshdevins
Copy link
Member

joshdevins commented Jan 21, 2020

Something looks off still. I think the second last } is off. It looks like it mixes 2 and 4-character indents as well, probably because of a mix of tabs and spaces. It should be:

{
  "inference": {
    "model_id": "flight_delay_regression-1571767128603",
    "target_field": "FlightDelayMin_prediction_infer",
    "field_mappings": {},
    "inference_config": { "regression": {} },
    "model_info_field": "ml"
  }
}

I also notice the other two snippets are not formatted correctly on the page, mostly because of the same problems and the quote marks are the wrong character (not ASCII "). They should be:

inference_config example:

{
  "inference_config": {
    "regression": {
      "results_field": "my_regression"
    }
  }
}

And

{
  "inference_config": {
    "classification": {
      "num_top_classes": 2,
      "results_field": "prediction",
      "top_classes_results_field": "probabilities"
    }
  }
}

@szabosteve
Copy link
Contributor Author

@joshdevins Thanks for the feedback. I amended the snippets accordingly.

@joshdevins
Copy link
Member

LGTM, all the JSON highlighting now works too! 🎉

@szabosteve szabosteve merged commit 4e0e6e8 into elastic:master Jan 21, 2020
@szabosteve szabosteve deleted the fix.ind branch January 21, 2020 15:21
szabosteve added a commit to szabosteve/elasticsearch that referenced this pull request Jan 21, 2020
szabosteve added a commit to szabosteve/elasticsearch that referenced this pull request Jan 21, 2020
@szabosteve
Copy link
Contributor Author

Backport commits:
7.x: 30d1587
7.6: e3f6331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :ml Machine learning v7.6.0 v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants