question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[examples] add --max_train_samples --max_val_samples --max_test_samples cl args to all scripts

See original GitHub issue

As a part of an effort to make all examples have the same look and feel this issue requests to sync the support for these 3 cl args in run_seq2seq.py:

--max_train_samples 5 --max_val_samples 5 --max_test_samples 5

into:

  1. all other examples/*/run_*.py
  2. templates/adding_a_new_example_script

Part B. the metrics should be now updated to include the actual number of samples that were run. here is an example for train: https://github.com/huggingface/transformers/blob/f52a15897b46ffa40af5c96d3726f0e18e91879b/examples/seq2seq/run_seq2seq.py#L586-L590 and the same for eval/test.

I’d say this can probable refactored too. Let me check with Sylvain.

The way it’s currently used is to limit the number of dataset entries w/o needing to change the dataset, example:

run_seq2seq.py --model_name_or_path t5-small --output_dir output_dir  --do_eval --do_predict --do_train \
--evaluation_strategy=steps  --predict_with_generate  --task summarization     --dataset_name xsum \
--max_train_samples 60 --max_val_samples 10 --n_test 10

All the code that currently takes care of it can be found inside https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_seq2seq.py

This issue is open to anybody in the community who would like to tackle it.

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bhadreshpsavanicommented, Mar 9, 2021

Hi @stas00, Since its just a template there no way to test the changes right?

1reaction
bhadreshpsavanicommented, Feb 27, 2021

Cool!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding arguments and options to your Bash scripts - Red Hat
Exploring methods for getting data into scripts and controlling the script's execution path for better automation and script management.
Read more >
How to use sys.argv in Python with examples - KnowledgeHut
Understanding sys.argv with examples. sys.argv is a list in Python that contains all the command-line arguments passed to the script.
Read more >
How To Handle Command-line Arguments in Node.js Scripts
In this article, you will learn how to use arguments in your Node.js scripts and then you will recreate the script with the...
Read more >
Propagate all arguments in a Bash shell script - Stack Overflow
bash features the "$@" variable, which expands to all command-line parameters separated by spaces. From Bash by example.
Read more >
Passing arguments to an R script from command lines
This post describes how to pass external arguments to R when calling a Rscript with a command line. The case study presented here...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found