### Example Task and Relation Length Specification Source: https://github.com/facebookresearch/clutrr/blob/main/README.md This example shows how to specify training and testing tasks with their respective relation lengths. ```bash python main.py --train_tasks 1.3 --test_tasks 1.3,1.4 ``` -------------------------------- ### Basic Task Execution Command Source: https://github.com/facebookresearch/clutrr/blob/main/README.md This command demonstrates how to run a specific CLUTRR task. Replace placeholders with desired task IDs and relation lengths. ```bash python main.py --train_task <> --test_tasks <> ``` -------------------------------- ### CLUTRR CLI Usage Source: https://github.com/facebookresearch/clutrr/blob/main/README.md This snippet displays the available command-line arguments for the main.py script. Use these options to configure dataset generation and testing. ```bash usage: main.py [-h] [--max_levels MAX_LEVELS] [--min_child MIN_CHILD] [--max_child MAX_CHILD] [--p_marry P_MARRY] [--boundary] [--output OUTPUT] [--rules_store RULES_STORE] [--relations_store RELATIONS_STORE] [--attribute_store ATTRIBUTE_STORE] [--train_tasks TRAIN_TASKS] [--test_tasks TEST_TASKS] [--train_rows TRAIN_ROWS] [--test_rows TEST_ROWS] [--memory MEMORY] [--data_type DATA_TYPE] [--question QUESTION] [-v] [-t TEST_SPLIT] [--equal] [--analyze] [--mturk] [--holdout] [--data_name DATA_NAME] [--use_mturk_template] [--template_length TEMPLATE_LENGTH] [--template_file TEMPLATE_FILE] [--template_split] [--combination_length COMBINATION_LENGTH] [--output_dir OUTPUT_DIR] [--store_full_puzzles] [--unique_test_pattern] optional arguments: -h, --help show this help message and exit --max_levels MAX_LEVELS max number of levels --min_child MIN_CHILD max number of children per node --max_child MAX_CHILD max number of children per node --p_marry P_MARRY Probability of marriage among nodes --boundary Boundary in entities --output OUTPUT Prefix of the output file --rules_store RULES_STORE Rules store --relations_store RELATIONS_STORE Relations store --attribute_store ATTRIBUTE_STORE Attributes store --train_tasks TRAIN_TASKS Define which task to create dataset for, including the relationship length, comma separated --test_tasks TEST_TASKS Define which tasks including the relation lengths to test for, comma separaated --train_rows TRAIN_ROWS number of train rows --test_rows TEST_ROWS number of test rows --memory MEMORY Percentage of tasks which are just memory retrieval --data_type DATA_TYPE train/test --question QUESTION Question type. 0 -> relational, 1 -> yes/no -v, --verbose print the paths -t TEST_SPLIT, --test_split TEST_SPLIT Testing split --equal Make sure each pattern is equal. Warning: Time complexity of generation increases if this flag is set. --analyze Analyze generated files --mturk prepare data for mturk --holdout if true, then hold out unique patterns in the test set --data_name DATA_NAME Dataset name --use_mturk_template use the templating data for mturk --template_length TEMPLATE_LENGTH Max Length of the template to substitute --template_file TEMPLATE_FILE location of placeholders --template_split Split on template level --combination_length COMBINATION_LENGTH number of relations to combine together --output_dir OUTPUT_DIR output_dir --store_full_puzzles store the full puzzle data in puzzles.pkl file. Warning: may take considerable amount of disk space! --unique_test_pattern If true, have unique patterns generated in the first gen, and then choose from it. ``` -------------------------------- ### Run CLUTRR Data Generation Source: https://github.com/facebookresearch/clutrr/blob/main/README.md This command generates training and testing data for CLUTRR. It specifies task configurations, dataset sizes, and includes flags for using AMT templates and ensuring unique test patterns. ```bash python main.py --train_tasks 1.2 --test_tasks 1.2 --train_rows 500 --test_rows 10 --equal --holdout --use_mturk_template --data_name "Robust Reasoning - clean - AMT" --unique_test_pattern ``` -------------------------------- ### CLUTRR Citation BibTeX Source: https://github.com/facebookresearch/clutrr/blob/main/README.md This is the BibTeX entry for citing the CLUTRR paper. Use this in your research publications if CLUTRR is helpful. ```bibtex @article{sinha2019clutrr, Author = {Koustuv Sinha and Shagun Sodhani and Jin Dong and Joelle Pineau and William L. Hamilton}, Title = {CLUTRR: A Diagnostic Benchmark for Inductive Reasoning from Text}, Year = {2019}, journal = {Empirical Methods of Natural Language Processing (EMNLP)}, arxiv = {1908.06177} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.