--- library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: "Consistent CFE_PSP_Main implementation\nRTEMS PSP hardcodes \"/cf/cfe_es_startup.scr\"\ , but mcp750 and pc-linux both use the CFE_PLATFORM_ES_NONVOL_STARTUP_FILE.\r\n\ \r\nInconsistent implementations.\r\n\r\nFrom #102 (solved here):\r\ncfe_psp_start.c\ \ for mcp750 VxWorks has StartupFilePath as an input parameter to CFE_PSP_Main,\ \ but calls CFE_ES_Main with CFE_PLATFORM_ES_NONVOL_STARTUP_FILE.\r\n\r\nConfusing\ \ implementation... looks like at least the pc-linux PSP only uses CFE_PLATFORM_ES_NONVOL_STARTUP_FILE\ \ (but a different prototype)." - text: "Fix input options handling dashes\n**Describe the bug**\r\nThe \"help\" option\ \ is triggered by `-help` which only uses one dash. Full-word options should use\ \ double dashes.\r\n\r\n**To Reproduce**\r\nSee code\r\n\r\n```\r\nif ((argc !=\ \ 2) || (strncmp(argv[1], \"-help\", 100) == 0))\r\n {\r\n printf(\"\ \\ncFE TS CRC calculator: \\%s\\n\", CFE_TS_CRC_VERSION_STRING);\r\n printf(\"\ \\nUsage: cfe_ts_crc [filename]\\n\");\r\n exit(0);\r\n }\r\n```\r\n\ \r\n**Expected behavior**\r\nUse `--help` instead\r\n\r\n**Code snips**\r\nIf\ \ applicable, add references to the software.\r\n\r\n**System observed on:**\r\ \nSource code\r\n\r\n**Additional context**\r\nNone\r\n\r\n**Reporter Info**\r\ \nGerardo E. Cruz-Ortiz, NASA-GSFC" - text: "OS_TaskExit() on VxWorks causes task table owner to be the deleted task\n\ **Describe the bug**\r\nOS_TaskExit() calls OS_ObjectIdFinalizeDelete(). This\ \ function sets the task's record->active_id to 0, which is also being used as\ \ the task ID on VxWorks. ObjectIdFinalizeDelete() subsequently calls OS_Unlock_Global,\ \ which errors out and does not clear the owner, as the task ID is now zeroed\ \ out and does not match the owner of the table. This does not occur on Linux\r\ \n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nOn VxWorks, call\ \ CFE_ES_ExitChildTask with OSAL_CONFIG_DEBUG_PRINTF enabled\r\n\r\n**Expected\ \ behavior**\r\nError message should not be printed out\r\n\r\n**Code snips**\r\ \nhttps://github.com/nasa/osal/blob/1a826576f8dd9eb37f47da0e633b1d4712b8ac61/src/os/shared/src/osapi-idmap.c#L745-L777\r\ \nhttps://github.com/nasa/osal/blob/1a826576f8dd9eb37f47da0e633b1d4712b8ac61/src/os/shared/src/osapi-idmap.c#L625-L676\r\ \nhttps://github.com/nasa/osal/blob/1a826576f8dd9eb37f47da0e633b1d4712b8ac61/src/os/vxworks/src/os-impl-tasks.c#L385-L413\r\ \nhttps://github.com/nasa/osal/blob/1a826576f8dd9eb37f47da0e633b1d4712b8ac61/src/os/posix/src/os-impl-tasks.c#L736-L751\r\ \n\r\n**System observed on:**\r\n - SP0\r\n - OS: VxWorks 6.9\r\n - Versions:\ \ CFE 6.8, OSAL 5.1.0-rc1+dev16, \r\n\r\n**Additional context**\r\nSee attached\ \ screenshots for stack traces\r\n![image](https://user-images.githubusercontent.com/63735778/98269251-82b02900-1f5b-11eb-83f9-0af820169aa8.png)\r\ \n![image](https://user-images.githubusercontent.com/63735778/98269098-5b595c00-1f5b-11eb-836c-4abd911c123e.png)\r\ \n**Reporter Info**\r\nJohn N. Pham, Northrop Grumman\r\n\r\n\r\n" - text: "Outdated License(?)\nMany files in the PSP (and one in the CFS) contain a\ \ file license header that seems to be outdated? It doesn't reference the NOSA,\ \ and seems to include restrictions that are in conflict with the NOSA (see the\ \ 2nd paragraph). Note, Working with the SourceForge cFE release.\r\n\r\nAn example:\r\ \n{{{\r\n** Copyright (c) 2004-2006, United States government as represented\ \ by the\r\n** administrator of the National Aeronautics Space Administration.\r\ \n** All rights reserved. This software(cFE) was created at NASA Goddard\r\ \n** Space Flight Center pursuant to government contracts.\r\n**\r\n** \ \ This software may be used only pursuant to a United States government\r\n\ ** sponsored project and the United States government may not be charged\r\ \n** for use thereof.\r\n}}}\r\n\r\nA quick grep showed these files:\r\n\ {{{\r\nfind . -type f -exec grep -li \"This software may be used only\" {} \\\ ;\r\n./CFS/hs/fsw/unit_test/cfe_psp_timer.c\r\n./cFE/psp/fsw/mcp750-vxworks6.4/inc/psp_version.h\r\ \n./cFE/psp/fsw/mcp750-vxworks6.4/inc/cfe_psp_config.h\r\n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_support.c\r\ \n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_start.c\r\n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_ssr.c\r\ \n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_voltab.c\r\n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_exception.c\r\ \n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_watchdog.c\r\n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_timer.c\r\ \n./cFE/psp/fsw/mcp750-vxworks6.4/src/cfe_psp_memory.c\r\n./cFE/psp/fsw/inc/cfe_psp.h\r\ \n./cFE/psp/fsw/arm-linux/inc/psp_version.h\r\n./cFE/psp/fsw/arm-linux/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/arm-linux/src/cfe_psp_support.c\r\n./cFE/psp/fsw/arm-linux/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/arm-linux/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/arm-linux/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/arm-linux/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/arm-linux/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/arm-linux/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/arm-linux/src/cfe_psp_memory.c\r\ \n./cFE/psp/fsw/pc-cygwin/inc/psp_version.h\r\n./cFE/psp/fsw/pc-cygwin/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_support.c\r\n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/pc-cygwin/src/cfe_psp_memory.c\r\ \n./cFE/psp/fsw/mac-osx/inc/psp_version.h\r\n./cFE/psp/fsw/mac-osx/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/mac-osx/src/cfe_psp_support.c\r\n./cFE/psp/fsw/mac-osx/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/mac-osx/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/mac-osx/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/mac-osx/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/mac-osx/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/mac-osx/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/mac-osx/src/cfe_psp_memory.c\r\ \n./cFE/psp/fsw/pc-linux/inc/psp_version.h\r\n./cFE/psp/fsw/pc-linux/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/pc-linux/src/cfe_psp_support.c\r\n./cFE/psp/fsw/pc-linux/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/pc-linux/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/pc-linux/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/pc-linux/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/pc-linux/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/pc-linux/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/pc-linux/src/cfe_psp_memory.c\r\ \n./cFE/psp/fsw/grut699-vxworks6/inc/psp_version.h\r\n./cFE/psp/fsw/grut699-vxworks6/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_support.c\r\n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/grut699-vxworks6/src/cfe_psp_memory.c\r\ \n./cFE/psp/fsw/mcf5235-rtems/inc/psp_version.h\r\n./cFE/psp/fsw/mcf5235-rtems/inc/cfe_psp_config.h\r\ \n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_support.c\r\n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_start.c\r\ \n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_ssr.c\r\n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_voltab.c\r\ \n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_exception.c\r\n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_watchdog.c\r\ \n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_timer.c\r\n./cFE/psp/fsw/mcf5235-rtems/src/cfe_psp_memory.c\r\ \n}}}\r\n" - text: "Use a changelog to keep track of changes instead of having them in the Readme\ \ \n**Is your feature request related to a problem? Please describe.**\r\nThe\ \ version history in the Readme file clutters useful information\r\n\r\n**Describe\ \ the solution you'd like**\r\nMove the \"version history\" from `Readme.md` to\ \ `CHANGELOG.md` and start following this spec: https://keepachangelog.com/en/1.0.0/\r\ \n\r\n**Describe alternatives you've considered**\r\nMove changelog section in\ \ the readme to a section at the very bottom of the file\r\n\r\n**Additional context**\r\ \nNone\r\n\r\n**Requester Info**\r\nGerardo E. Cruz-Ortiz, NASA-GSFC\r\n" inference: true --- # SetFit This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 384 tokens - **Number of Classes:** 2 classes ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:--------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | non-bug | | | bug | | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("setfit_model_id") # Run inference preds = model("Consistent CFE_PSP_Main implementation RTEMS PSP hardcodes \"/cf/cfe_es_startup.scr\", but mcp750 and pc-linux both use the CFE_PLATFORM_ES_NONVOL_STARTUP_FILE. Inconsistent implementations. From #102 (solved here): cfe_psp_start.c for mcp750 VxWorks has StartupFilePath as an input parameter to CFE_PSP_Main, but calls CFE_ES_Main with CFE_PLATFORM_ES_NONVOL_STARTUP_FILE. Confusing implementation... looks like at least the pc-linux PSP only uses CFE_PLATFORM_ES_NONVOL_STARTUP_FILE (but a different prototype).") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:-----| | Word count | 1 | 110.5796 | 2778 | | Label | Training Sample Count | |:--------|:----------------------| | bug | 662 | | non-bug | 1517 | ### Training Hyperparameters - batch_size: (16, 2) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0002 | 1 | 0.4726 | - | | 0.0092 | 50 | 0.2725 | - | | 0.0184 | 100 | 0.2269 | - | | 0.0275 | 150 | 0.2061 | - | | 0.0367 | 200 | 0.2113 | - | | 0.0459 | 250 | 0.1806 | - | | 0.0551 | 300 | 0.1833 | - | | 0.0642 | 350 | 0.1578 | - | | 0.0734 | 400 | 0.1478 | - | | 0.0826 | 450 | 0.1376 | - | | 0.0918 | 500 | 0.1135 | - | | 0.1010 | 550 | 0.1145 | - | | 0.1101 | 600 | 0.1099 | - | | 0.1193 | 650 | 0.0859 | - | | 0.1285 | 700 | 0.0837 | - | | 0.1377 | 750 | 0.0826 | - | | 0.1468 | 800 | 0.0809 | - | | 0.1560 | 850 | 0.0559 | - | | 0.1652 | 900 | 0.0539 | - | | 0.1744 | 950 | 0.0444 | - | | 0.1836 | 1000 | 0.0376 | - | | 0.1927 | 1050 | 0.0387 | - | | 0.2019 | 1100 | 0.035 | - | | 0.2111 | 1150 | 0.0317 | - | | 0.2203 | 1200 | 0.029 | - | | 0.2294 | 1250 | 0.0277 | - | | 0.2386 | 1300 | 0.0108 | - | | 0.2478 | 1350 | 0.0226 | - | | 0.2570 | 1400 | 0.0105 | - | | 0.2662 | 1450 | 0.02 | - | | 0.2753 | 1500 | 0.016 | - | | 0.2845 | 1550 | 0.0181 | - | | 0.2937 | 1600 | 0.0184 | - | | 0.3029 | 1650 | 0.0113 | - | | 0.3120 | 1700 | 0.014 | - | | 0.3212 | 1750 | 0.0101 | - | | 0.3304 | 1800 | 0.0106 | - | | 0.3396 | 1850 | 0.0101 | - | | 0.3488 | 1900 | 0.0117 | - | | 0.3579 | 1950 | 0.0115 | - | | 0.3671 | 2000 | 0.0113 | - | | 0.3763 | 2050 | 0.005 | - | | 0.3855 | 2100 | 0.0062 | - | | 0.3946 | 2150 | 0.0141 | - | | 0.4038 | 2200 | 0.0096 | - | | 0.4130 | 2250 | 0.0117 | - | | 0.4222 | 2300 | 0.0051 | - | | 0.4314 | 2350 | 0.0054 | - | | 0.4405 | 2400 | 0.0049 | - | | 0.4497 | 2450 | 0.0054 | - | | 0.4589 | 2500 | 0.0027 | - | | 0.4681 | 2550 | 0.0009 | - | | 0.4772 | 2600 | 0.0021 | - | | 0.4864 | 2650 | 0.005 | - | | 0.4956 | 2700 | 0.0026 | - | | 0.5048 | 2750 | 0.0025 | - | | 0.5140 | 2800 | 0.0014 | - | | 0.5231 | 2850 | 0.0005 | - | | 0.5323 | 2900 | 0.0012 | - | | 0.5415 | 2950 | 0.0027 | - | | 0.5507 | 3000 | 0.0002 | - | | 0.5598 | 3050 | 0.0012 | - | | 0.5690 | 3100 | 0.0015 | - | | 0.5782 | 3150 | 0.0001 | - | | 0.5874 | 3200 | 0.0 | - | | 0.5965 | 3250 | 0.0001 | - | | 0.6057 | 3300 | 0.0011 | - | | 0.6149 | 3350 | 0.0012 | - | | 0.6241 | 3400 | 0.0043 | - | | 0.6333 | 3450 | 0.0027 | - | | 0.6424 | 3500 | 0.0007 | - | | 0.6516 | 3550 | 0.0033 | - | | 0.6608 | 3600 | 0.0005 | - | | 0.6700 | 3650 | 0.0011 | - | | 0.6791 | 3700 | 0.0023 | - | | 0.6883 | 3750 | 0.0009 | - | | 0.6975 | 3800 | 0.0012 | - | | 0.7067 | 3850 | 0.0021 | - | | 0.7159 | 3900 | 0.0003 | - | | 0.7250 | 3950 | 0.0001 | - | | 0.7342 | 4000 | 0.0001 | - | | 0.7434 | 4050 | 0.0001 | - | | 0.7526 | 4100 | 0.0023 | - | | 0.7617 | 4150 | 0.0025 | - | | 0.7709 | 4200 | 0.0001 | - | | 0.7801 | 4250 | 0.0 | - | | 0.7893 | 4300 | 0.0 | - | | 0.7985 | 4350 | 0.001 | - | | 0.8076 | 4400 | 0.0013 | - | | 0.8168 | 4450 | 0.0002 | - | | 0.8260 | 4500 | 0.0026 | - | | 0.8352 | 4550 | 0.0002 | - | | 0.8443 | 4600 | 0.0002 | - | | 0.8535 | 4650 | 0.0 | - | | 0.8627 | 4700 | 0.0001 | - | | 0.8719 | 4750 | 0.0012 | - | | 0.8811 | 4800 | 0.001 | - | | 0.8902 | 4850 | 0.0001 | - | | 0.8994 | 4900 | 0.001 | - | | 0.9086 | 4950 | 0.0002 | - | | 0.9178 | 5000 | 0.0002 | - | | 0.9269 | 5050 | 0.001 | - | | 0.9361 | 5100 | 0.0001 | - | | 0.9453 | 5150 | 0.0021 | - | | 0.9545 | 5200 | 0.0001 | - | | 0.9637 | 5250 | 0.0001 | - | | 0.9728 | 5300 | 0.0 | - | | 0.9820 | 5350 | 0.0001 | - | | 0.9912 | 5400 | 0.0002 | - | ### Framework Versions - Python: 3.11.6 - SetFit: 1.1.0 - Sentence Transformers: 3.0.1 - Transformers: 4.44.2 - PyTorch: 2.4.1+cu121 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```