{"id":23067904,"url":"https://github.com/dhruvdcoder/wandb-allennlp","last_synced_at":"2025-09-11T22:31:23.805Z","repository":{"id":37836121,"uuid":"232221797","full_name":"dhruvdcoder/wandb-allennlp","owner":"dhruvdcoder","description":"Utilities and boilerplate code to use wandb with allennlp","archived":false,"fork":false,"pushed_at":"2023-05-22T11:32:24.000Z","size":597,"stargazers_count":21,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T23:20:24.547Z","etag":null,"topics":["allennlp","deep-learning","machine-learning","sweep","wandb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhruvdcoder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-07T02:00:24.000Z","updated_at":"2024-01-04T16:41:06.000Z","dependencies_parsed_at":"2025-01-06T03:08:14.920Z","dependency_job_id":null,"html_url":"https://github.com/dhruvdcoder/wandb-allennlp","commit_stats":{"total_commits":85,"total_committers":5,"mean_commits":17.0,"dds":0.3647058823529412,"last_synced_commit":"99ffb013fb38eb26a9641be4cc3f4f5e361d2582"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/dhruvdcoder/wandb-allennlp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvdcoder%2Fwandb-allennlp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvdcoder%2Fwandb-allennlp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvdcoder%2Fwandb-allennlp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvdcoder%2Fwandb-allennlp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruvdcoder","download_url":"https://codeload.github.com/dhruvdcoder/wandb-allennlp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvdcoder%2Fwandb-allennlp/sbom","scorecard":{"id":340532,"data":{"date":"2025-08-11","repo":{"name":"github.com/dhruvdcoder/wandb-allennlp","commit":"99ffb013fb38eb26a9641be4cc3f4f5e361d2582"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/changelog.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-build-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/deployment.yml:1","Warn: no topLevel permission defined: .github/workflows/labeler.yml:1","Warn: no topLevel permission defined: .github/workflows/pull_requests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/changelog.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/changelog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/changelog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/changelog.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-docs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/ci-build-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-docs.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/ci-build-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-docs.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/ci-build-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-build-docs.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/ci-build-docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-build-docs.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/ci-build-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deployment.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/deployment.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deployment.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/deployment.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/labeler.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/labeler.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/labeler.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/labeler.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_requests.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/pull_requests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_requests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/pull_requests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_requests.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/dhruvdcoder/wandb-allennlp/pull_requests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci-build-docs.yml:41","Warn: pipCommand not pinned by hash: .github/workflows/ci-build-docs.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/deployment.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/deployment.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/pull_requests.yml:40","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T05:42:17.769Z","repository_id":37836121,"created_at":"2025-08-18T05:42:17.769Z","updated_at":"2025-08-18T05:42:17.769Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274717358,"owners_count":25336875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allennlp","deep-learning","machine-learning","sweep","wandb"],"created_at":"2024-12-16T05:19:18.161Z","updated_at":"2025-09-11T22:31:23.401Z","avatar_url":"https://github.com/dhruvdcoder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wandb-allennlp\n\n\n![Tests](https://github.com/dhruvdcoder/wandb-allennlp/workflows/Tests/badge.svg)\n\n\nUtilities and boilerplate code which allows using [Weights \u0026 Biases](https://www.wandb.com/) to tune the hypereparameters for any AllenNLP model **without a single line of extra code!**\n\n# What does it do?\n\n1. Log a single run or a hyperparameter search sweep without any extra code, just using configuration files.\n\n2. Use [Weights \u0026 Biases'](https://www.wandb.com/) bayesian hyperparameter search engine + hyperband in any AllenNLP project.\n\n\n\n# Quick start\n\n## Installation\n\n```\n$ pip install wandb-allennlp\n$ echo wandb_allennlp \u003e\u003e .allennlp_plugins\n```\n\n\n\n## Log a single run\n\n1. Create your model using AllenNLP along with a *training configuration* file as you would normally do.\n\n2. Add a trainer callback in your config file. Use one of the following based on your AllenNLP version:\n\n\n```\n...,\n\ntrainer: {\n    type: 'callback',\n    callbacks: [\n      ...,\n      {\n        type: 'wandb_allennlp',\n        files_to_save: ['config.json'],\n        files_to_save_at_end: ['*.tar.gz'],\n      },\n      ...,\n    ],\n    ...,\n}\n...\n...\n```\n\n2. Execute the `allennlp train-with-wandb` command instead of `allennlp train`. It supports all the arguments present in `allennlp train`. However, the `--overrides` have to be specified in the `--kw value` or `--kw=value` form, where `kw` is the parameter to override and `value` is its value. Use the dot notation for nested parameters. For instance, `{'model': {'embedder': {'type': xyz}}}` can be provided as `--model.embedder.type xyz`.\n\n```\nallennlp  train-with-wandb model_configs/my_config.jsonnet --include-package=package_with_my_registered_classes --include-package=another_package --wandb-run-name=my_first_run --wandb-tags=any,set,of,non-unique,tags,that,identify,the,run,without,spaces\n\n```\n\n\n## Hyperparameter Search\n\n1. Create your model using AllenNLP along with a *training configuration* file as you would normally do. For example:\n\n```\nlocal data_path = std.extVar('DATA_PATH');\nlocal a = std.parseJson(std.extVar('a'));\nlocal bool_value = std.parseJson(std.extVar('bool_value'));\nlocal int_value = std.parseJson(std.extVar('int_value'));\n\n{\n  type: 'train_test_log_to_wandb',\n  evaluate_on_test: true,\n  dataset_reader: {\n    type: 'snli',\n    token_indexers: {\n      tokens: {\n        type: 'single_id',\n        lowercase_tokens: true,\n      },\n    },\n  },\n  train_data_path: data_path + '/snli_1.0_test/snli_1.0_train.jsonl',\n  validation_data_path: data_path + '/snli_1.0_test/snli_1.0_dev.jsonl',\n  test_data_path: data_path + '/snli_1.0_test/snli_1.0_test.jsonl',\n  model: {\n    type: 'parameter-tying',\n    a: a,\n    b: a,\n    d: 0,\n    bool_value: bool_value,\n    bool_value_not: !bool_value,\n    int_value: int_value,\n    int_value_10: int_value + 10,\n\n  },\n  data_loader: {\n    batch_sampler: {\n      type: 'bucket',\n      batch_size: 64,\n    },\n  },\n  trainer: {\n    optimizer: {\n      type: 'adam',\n      lr: 0.001,\n      weight_decay: 0.0,\n    },\n    cuda_device: -1,\n    num_epochs: 2,\n    callbacks: [\n      {\n        type: 'wandb_allennlp',\n        files_to_save: ['config.json'],\n        files_to_save_at_end: ['*.tar.gz'],\n      },\n    ],\n  },\n}\n```\n\n2. Create a *sweep configuration* file and generate a sweep on the wandb server. Note that the tied parameters that are accepted through environment variables are specified using the prefix `env.` in the sweep config. For example:\n\n```\nname: parameter_tying_test_console_script_v0.2.4\nprogram: allennlp\ncommand:\n  - ${program} #omit the interpreter as we use allennlp train command directly\n  - \"train-with-wandb\" # subcommand\n  - \"configs/parameter_tying_v0.2.4.jsonnet\"\n  - \"--include-package=models\" # add all packages containing your registered classes here\n  - \"--include-package=allennlp_models\"\n  - ${args}\nmethod: bayes\nmetric:\n  name: training_loss\n  goal: minimize\nparameters:\n  # hyperparameters start with overrides\n  # Ranges\n  # Add env. to tell that it is a top level parameter\n  env.a:\n    min: 1\n    max: 10\n    distribution: uniform\n  env.bool_value:\n    values: [true, false]\n  env.int_value:\n    values: [-1, 0, 1, 10]\n  model.d:\n    value: 1\n```\n3. Create the sweep on wandb.\n\n```\n$ wandb sweep path_to_sweep.yaml\n```\n\n4. Set the other environment variables required by your jsonnet.\n\n```\nexport DATA_DIR=./data\n```\n\n5. Start the search agents.\n\n```\nwandb agent \u003csweep_id\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvdcoder%2Fwandb-allennlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruvdcoder%2Fwandb-allennlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvdcoder%2Fwandb-allennlp/lists"}