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

Docfix: Fix typo in Installation doc #1181

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Unitxt conforms to the HuggingFace Datasets and Metrics APIs, so it can be used
testset = dataset["test"]
model_inputs = testset["source"]
model = pipeline(model='google/flan-t5-base')
predictions = [output['generated_text'] for output in model(model_inputs,max_new_tokens=30)]
metric = evaluate.load("unitxt/metric",trust_remote_code=True)
dataset_with_scores = metric.compute(predictions=predictions,references=testset)
[print(item) for item in scores[0]['score']['global'].items()]
predictions = [output['generated_text'] for output in model(model_inputs, max_new_tokens=30)]

metric = evaluate.load("unitxt/metric", trust_remote_code=True)
dataset_with_scores = metric.compute(predictions=predictions, references=testset)
[print(item) for item in dataset_with_scores[0]['score']['global'].items()]

Note, the `trust_remote_code=True` flag is required because in the background the HuggingFace API downloads and installs the
latest version of Unitxt from https://huggingface.co/datasets/unitxt/data/tree/main.
Expand Down
Loading