instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
topoteretes__cognee__2321
topoteretes/cognee
2,321
defect
c9370a8b1f2ac9162eca400a32443dccac01225d
ee8c0b2a4d5ef35ee8e3b2f66be71f33e8fe527a
fix: replace mutable default arguments with None
## Description Replace mutable default arguments (`dict = {}`, `list = []`) with `None` and initialize inside the function body. This is a well-known Python anti-pattern where the default mutable object is shared across all calls, leading to subtle bugs where state leaks between invocations. Fixes #2299 ## Acceptanc...
diff --git a/cognee/modules/storage/utils/__init__.py b/cognee/modules/storage/utils/__init__.py index 9cf65faaeb..360eb45ea5 100644 --- a/cognee/modules/storage/utils/__init__.py +++ b/cognee/modules/storage/utils/__init__.py @@ -20,7 +20,11 @@ def default(self, obj): return json.JSONEncoder.default(self, obj...
1
1
0
[{"id": "G0", "claim": "In send_telemetry the None-initialization is duplicated, so the second `if additional_properties is None` branch after line 84 is dead code and should be dropped.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
topoteretes__cognee__2382
topoteretes/cognee
2,382
defect
af1b8dd6431aeebebfa5be168343d4d9aaff3caa
e04f56f89e0d6b77c7cc674c1ad2ca196694141b
fix: add support for SSL mode in database configuration
Hello everyone! According to what was discussed on Discord, I opened a pull request to fix the SSL problem that has occurred since version 0.5.2. In that [commit](https://github.com/topoteretes/cognee/commit/f26b490a8f5b3f0bb400396a4fb71771ee325ab0), we started sending `connect_args`, and because of that the defa...
diff --git a/.env.template b/.env.template index b821d4fb35..75051335af 100644 --- a/.env.template +++ b/.env.template @@ -90,6 +90,8 @@ DB_NAME=cognee_db #DB_PORT=5432 #DB_USERNAME=cognee #DB_PASSWORD=cognee +# SSL mode for PostgreSQL connections (e.g., "require", "verify-ca", "verify-full", "prefer", "disable") +#...
3
3
1
[{"id": "G0", "claim": "The .env.template should document how DB_SSL_MODE interacts with the existing DATABASE_CONNECT_ARGS PostgreSQL SSL example (which source wins) or remove the overlapping example, so users do not set both and debug contradictory configs.", "category": "documentation", "verdict": "supported", "prio...
null
topoteretes__cognee__2391
topoteretes/cognee
2,391
defect
121c1bc55a6e363708b390c59ef5e12902176d41
d03dc928a254999880147a56e695b2596a77bb02
fix: standardize API error responses and consolidate tests
## Summary - Standardize error responses across all API endpoints (add, cognify, search, memify, update) using `ErrorResponse` DTO - Add proper HTTP status codes: 422 for pipeline errors, 403 for permission denied, 400 for bad requests, 500 for internal errors - Consolidate 5 separate test files into one (`test_api_err...
diff --git a/cognee/api/DTO.py b/cognee/api/DTO.py index fc2e1cc5f1..e6a84dbdff 100644 --- a/cognee/api/DTO.py +++ b/cognee/api/DTO.py @@ -1,6 +1,6 @@ from pydantic import BaseModel, ConfigDict from pydantic.alias_generators import to_camel, to_snake - +from typing import Optional class OutDTO(BaseModel): mod...
7
1
1
[{"id": "G0", "claim": "The add, cognify, memify and update routes advertise 403 (and 422) in their responses declarations but no code path returns them, because permission errors from the underlying operation fall into the generic catch-all; add a dedicated permission-denied branch before the fallback.", "category": "...
null
topoteretes__cognee__2431
topoteretes/cognee
2,431
defect
5469622dabc528d59921be711ade5bcb379889e7
68d30e5e954de03c2488551b42dedd2e21e9d415
fix: prevent shell injection in Neo4j eval scripts
## Description Replace `shell=True` subprocess calls with argument lists in two eval scripts to prevent command injection via `NEO4J_AUTH` password containing shell metacharacters (`;`, `|`, `$()`, backticks). **CWE-78**: OS Command Injection Fixes #2422 ## Type of Change - [x] Bug fix (non-breaking change that fixe...
diff --git a/evals/src/modal_apps/modal_qa_benchmark_graphiti.py b/evals/src/modal_apps/modal_qa_benchmark_graphiti.py index 95bf93f825..d1e48f31ed 100644 --- a/evals/src/modal_apps/modal_qa_benchmark_graphiti.py +++ b/evals/src/modal_apps/modal_qa_benchmark_graphiti.py @@ -73,11 +73,9 @@ async def launch_neo4j_and_run...
1
1
0
[{"id": "G0", "claim": "Use partition() instead of .split(\"/\") to parse NEO4J_AUTH, because the split-based parsing raises IndexError on malformed input and silently truncates a password containing '/', and also reuse the parsed password at line 117 rather than re-parsing.", "category": "correctness", "verdict": "sup...
null
topoteretes__cognee__2434
topoteretes/cognee
2,434
defect
acac64a49a9a73c689d36aef1da0e917c36c84a4
4b0bfa0a50cbbe80a9ec6d7157021b9df50ba1d7
fix: restore money regex coverage (#2356)
## Description - tighten the MONEY regex so it matches currency-prefixed amounts without picking up plain numeric tokens - restore `test_extract_money` with a focused regression case for `$1,299.99` and `€1.045,00` - closes #2356 ## Acceptance Criteria - MONEY extraction matches the currency amounts from the issue sce...
diff --git a/cognee/tasks/entity_completion/entity_extractors/regex_entity_config.json b/cognee/tasks/entity_completion/entity_extractors/regex_entity_config.json index 7d1005ebb4..7b57a2117e 100644 --- a/cognee/tasks/entity_completion/entity_extractors/regex_entity_config.json +++ b/cognee/tasks/entity_completion/enti...
1
1
1
[{"id": "G0", "claim": "The MONEY regex added in S1 still accepts mixed-separator formats like $1,234.567,89 because thousands and decimal separators are independent; it should be tightened by splitting US/EU branches so separators remain internally consistent.", "category": "correctness", "verdict": "supported", "prio...
null
topoteretes__cognee__2437
topoteretes/cognee
2,437
defect
211b725424c177264904bd68521095b141f08456
d9e02f49d2d7a537bb7ee42f9ca45af8551dcd9c
feat: adds default ttl to redis based sessions
<!-- .github/pull_request_template.md --> ## Description This PR adds configurable TTL support for Redis-backed session data in Cognee. Before this change, Redis session keys used for Q&A history, feedback, and session-scoped state were never expired, which could lead to unbounded Redis growth in long-lived ...
diff --git a/cognee/infrastructure/databases/cache/config.py b/cognee/infrastructure/databases/cache/config.py index c850e3461e..3d9095df09 100644 --- a/cognee/infrastructure/databases/cache/config.py +++ b/cognee/infrastructure/databases/cache/config.py @@ -13,6 +13,8 @@ class CacheConfig(BaseSettings): - cache_p...
6
1
1
[{"id": "G0", "claim": "The in-memory Redis mock's flushdb() only clears data, so the newly added ttls and expire_calls metadata survives flushdb and stale TTL state can leak into recreated keys across tests.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl...
null
topoteretes__cognee__2438
topoteretes/cognee
2,438
defect
211b725424c177264904bd68521095b141f08456
2977616316d8b3176ea6559703dca883884ce008
COG-4367: Implement importance-weighted ingestion
## Description Introduce `importance_weight` to `cognee.add` to enable prioritizing information sources. Then update `cognee.cognify` so all the child entities created from some source inherit its `importance_weight`. ## Acceptance Criteria <!-- * Key requirements to the new feature or modification; * Proof that...
diff --git a/cognee/api/v1/add/add.py b/cognee/api/v1/add/add.py index ae881742ab..a9146ef00e 100644 --- a/cognee/api/v1/add/add.py +++ b/cognee/api/v1/add/add.py @@ -37,6 +37,7 @@ async def add( preferred_loaders: Optional[List[Union[str, dict[str, dict[str, Any]]]]] = None, incremental_loading: bool = True,...
6
3
3
[{"id": "G0", "claim": "Redeclaring `importance_weight: float` without a default in Document overrides the parent DataPoint's 0.5 default, making the field required and causing validation failures in code that creates Document or its subclasses without passing importance_weight; add the default back.", "category": "cor...
null
topoteretes__cognee__2457
topoteretes/cognee
2,457
defect
5469622dabc528d59921be711ade5bcb379889e7
65c407cb5dcb6c0d9dae21b682b598cd119ca9b1
feat(embeddings): add OpenAICompatibleEmbeddingEngine for local servers (llama.cpp, vLLM, TEI)
## Summary Adds a new embedding provider `openai_compatible` that communicates directly with OpenAI-compatible embedding servers via the `openai` Python SDK, bypassing litellm entirely for the embedding path. ## Problem When using Cognee with local/self-hosted embedding servers (llama.cpp, vLLM, Hugging Face TEI, Lo...
diff --git a/cognee/infrastructure/databases/vector/embeddings/OpenAICompatibleEmbeddingEngine.py b/cognee/infrastructure/databases/vector/embeddings/OpenAICompatibleEmbeddingEngine.py new file mode 100644 index 0000000000..e78d2086cd --- /dev/null +++ b/cognee/infrastructure/databases/vector/embeddings/OpenAICompatibl...
9
8
5
[{"id": "G0", "claim": "The substring \"maximum\" in the error check could match unrelated errors like \"maximum retries exceeded\" and wrongly trigger the context-splitting logic, so more specific context-error patterns should be matched instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "...
null
topoteretes__cognee__2469
topoteretes/cognee
2,469
defect
5469622dabc528d59921be711ade5bcb379889e7
d638608a68dd00bcf20ee664f6c9f50106c99053
fix(migrations): use sys.executable instead of bare 'python' in subprocess call
## Problem `cognee/run_migrations.py` uses `["python", "-m", "alembic", ...]` in the subprocess call (line 40). On Windows with uv-managed Python, bare `python` resolves to the system uv Python (`C:\Users\...\AppData\Roaming\uv\python\...\python.exe`) instead of the venv's Python, which doesn't have alembic installed....
diff --git a/cognee/run_migrations.py b/cognee/run_migrations.py index bc53d251d3..af548c38a6 100644 --- a/cognee/run_migrations.py +++ b/cognee/run_migrations.py @@ -37,7 +37,7 @@ async def run_migrations(): ) migration_result = subprocess.run( - ["python", "-m", "alembic", "upgrade", "head"], +...
1
1
0
[{"id": "G0", "claim": "Remove the redundant mock setup for pkg_resources.files in test_uses_sys_executable: the MagicMock with __str__ defined at lines 13-16 is immediately overwritten by a plain string at line 28, so choose one approach (the suggested patch collapses it to a single @patch with a string return value)....
null
topoteretes__cognee__2477
topoteretes/cognee
2,477
defect
7f5db084626c759232a2b51d4d2c6a18c386813f
36a94cefeb8a677c14030ca8209dc8d068e402ff
feat: add loader for docling-supproted file formats
<!-- .github/pull_request_template.md --> ## Description <!-- Please provide a clear, human-generated description of the changes in this PR. DO NOT use AI-generated descriptions. We want to understand your thought process and reasoning. --> This PR adds a loader for file types that Docling supports. The loader ...
diff --git a/cognee/infrastructure/loaders/LoaderEngine.py b/cognee/infrastructure/loaders/LoaderEngine.py index 4a363a0e68..d383bdef5c 100644 --- a/cognee/infrastructure/loaders/LoaderEngine.py +++ b/cognee/infrastructure/loaders/LoaderEngine.py @@ -34,6 +34,7 @@ def __init__(self): "csv_loader", ...
6
1
0
[{"id": "G0", "claim": "The module docstring in cognee/infrastructure/loaders/external/__init__.py should be updated to list the newly added docling_loader among the external loaders.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "_get_docling_sup...
null
topoteretes__cognee__2485
topoteretes/cognee
2,485
defect
5469622dabc528d59921be711ade5bcb379889e7
572d9a2d50c1f72f592e8738370f8b07f5b45d78
fix: skip duplicate nodes in CogneeGraph instead of raising error
## Problem When using FalkorDB as graph backend, `get_graph_data()` can return duplicate nodes with the same ID (e.g., nodes that appear under multiple label paths). The current `CogneeGraph.add_node()` raises `EntityAlreadyExistsError` on duplicates, which crashes `GRAPH_COMPLETION` searches: ```python # CogneeGraph...
diff --git a/cognee/modules/graph/cognee_graph/CogneeGraph.py b/cognee/modules/graph/cognee_graph/CogneeGraph.py index aad6ad8585..c4188f0255 100644 --- a/cognee/modules/graph/cognee_graph/CogneeGraph.py +++ b/cognee/modules/graph/cognee_graph/CogneeGraph.py @@ -38,10 +38,13 @@ def __init__(self, directed: bool = True)...
3
2
1
[{"id": "G0", "claim": "The change breaks the existing test at cognee/tests/unit/modules/graph/cognee_graph_test.py:38-42, which expects EntityAlreadyExistsError to be raised on duplicate node addition, so the test should be updated to reflect the new behavior.", "category": "testing", "verdict": "supported", "priority...
null
topoteretes__cognee__2559
topoteretes/cognee
2,559
defect
452333ae7168e4272996fe6c8cf7dc782cdc98e3
e9463945ad0e3186ec05ea9da622c103ed0ab617
fix(graph): fix edge dedup losing candidates and mismatching keys
Fixes #2557 ## Description `retrieve_existing_edges()` has a few compounding bugs that basically make edge dedup a no-op: - `graph_node_edges` gets reassigned (`=`) each loop iteration instead of accumulated (`.extend()`), so only the last chunk's edges end up in the query - the map keys use raw concatenation (`s...
diff --git a/cognee/modules/graph/utils/retrieve_existing_edges.py b/cognee/modules/graph/utils/retrieve_existing_edges.py index e987672221..e4af27cab1 100644 --- a/cognee/modules/graph/utils/retrieve_existing_edges.py +++ b/cognee/modules/graph/utils/retrieve_existing_edges.py @@ -1,9 +1,13 @@ from cognee.infrastruct...
5
2
0
[{"id": "G0", "claim": "Clarify why the test file uses the importlib.import_module pattern, or replace it with a standard import plus string-path patching.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Reuse the existing _create_edge_key helper...
null
topoteretes__cognee__2627
topoteretes/cognee
2,627
defect
9ff2bf902f5630d2f2271381cac8155bb33a3a36
2973579b3a8b366de274eb557c73994e9e5397bb
fix: remove EdgeType nodes storing to graph
<!-- .github/pull_request_template.md --> ## Description <!-- Please provide a clear, human-generated description of the changes in this PR. DO NOT use AI-generated descriptions. We want to understand your thought process and reasoning. --> Disabled storing of EdgeType nodes to graphdb. ## Acceptance Criteri...
diff --git a/cognee/tasks/storage/index_graph_edges.py b/cognee/tasks/storage/index_graph_edges.py index 00a36e8c55..75d0c863c1 100644 --- a/cognee/tasks/storage/index_graph_edges.py +++ b/cognee/tasks/storage/index_graph_edges.py @@ -53,8 +53,7 @@ async def index_graph_edges( Steps: 1. Initialize the graph e...
1
1
1
[{"id": "G0", "claim": "The test should keep ENABLE_BACKEND_ACCESS_CONTROL set to True so the permission scenario still exercises the access-controlled backend path, with any coverage of the disabled mode added as a separate test.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc...
null
topoteretes__cognee__2637
topoteretes/cognee
2,637
defect
a76025d34dcb64482cb638a910c5c797b9d946c3
733fb801d39bff0a0314e4b9e7dfc0fb1df0bf75
fix: vector db migrations run for all datasets. fixes to lancedb migration
<!-- .github/pull_request_template.md --> ## Description <!-- Please provide a clear, human-generated description of the changes in this PR. DO NOT use AI-generated descriptions. We want to understand your thought process and reasoning. --> This PR fixes how we call vector database migrations. Now we call them ...
diff --git a/cognee/api/v1/remember/remember.py b/cognee/api/v1/remember/remember.py index b965f06572..80f5ca47bf 100644 --- a/cognee/api/v1/remember/remember.py +++ b/cognee/api/v1/remember/remember.py @@ -24,25 +24,6 @@ logger = get_logger("remember") -_migrations_done = False - - -async def _ensure_migrations_r...
8
2
2
[{"id": "G0", "claim": "The reviewer asks that cognee/run_migrations.py replace logging.getLogger(__name__) with get_logger() from cognee.shared.logging_utils, per project guidelines for all cognee/**/*.py files.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id":...
null
topydo__topydo__101
topydo/topydo
101
defect
fc154914a24b313e2cecbfd55b7147bcaa8ea37e
65ef3b62cdaaa52f20bdad03a3effa5957fa314b
Introduce keymap for column_mode
User can now specify key-shortcuts in main topydo config file under 'column_keymap' section in form of: `<SHORTCUT> = <ACTION>` Two main types of action are supported: - built-in (one of: 'home', 'end', 'up', 'down', 'postpone', 'postpone_s' and 'pri') - topydo commands (aliases included). Prefixed with 'cmd'. Comm...
diff --git a/test/data/ConfigTest6.conf b/test/data/ConfigTest6.conf new file mode 100644 index 00000000..137124d4 --- /dev/null +++ b/test/data/ConfigTest6.conf @@ -0,0 +1,4 @@ +[column_keymap] +up = up +<Left> = prev_column +<Esc>d = delete_column diff --git a/test/test_config.py b/test/test_config.py index 238f9c76....
11
10
3
[{"id": "G0", "claim": "The first_to_upper helper can be replaced with the built-in p_key.capitalize() and removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `if len(p_key) > 1` check in keypress should live inside translate_key_to_cfg,...
null
topydo__topydo__110
topydo/topydo
110
defect
e9a61bc55cddb13bb6afd9b1caebb0247c6cf39b
02b5e2661ca356097619f11bfb2b364cec62061f
Recover previous ansi-color functionality
Seems like everything works now, but 2 nasty hacks are involved: 1. [Colors.py@199](https://github.com/mruwek/topydo/blob/a3651423b15c3e369e872334a345634e5fd828ea/topydo/lib/Colors.py#L199) 2. [Colors.py@61](https://github.com/mruwek/topydo/blob/a3651423b15c3e369e872334a345634e5fd828ea/topydo/lib/Colors.py#L61) Ideas ...
diff --git a/test/test_colors.py b/test/test_colors.py index f5686aeb..3a407a1c 100644 --- a/test/test_colors.py +++ b/test/test_colors.py @@ -29,97 +29,101 @@ class ColorsTest(TopydoTest): def test_project_color1(self): config(p_overrides={('colorscheme', 'project_color'): '2'}) - color = get_ans...
2
2
1
[{"id": "G0", "claim": "Get rid of the KeyError clause in normalize_color, since the exception is likely to be raised when using 256 colors and hurts performance, e.g. by checking membership first and catching only ValueError, and always return an integer (xterm range or -1) instead of returning the value as-is.", "cat...
null
topydo__topydo__131
topydo/topydo
131
defect
14ab34d62c11b5724e7e58118eaf5f5933b33c5d
a531c6553b9f74912acb29acea770813ed2c665f
Add HiddenTagFilter
Use the `h:1` tag to hide items from being listed Includes tests (existing tests were adjusted to test for the expected behavior)
diff --git a/test/data/ListCommandTest.txt b/test/data/ListCommandTest.txt index 35b8da81..1e3c94a1 100644 --- a/test/data/ListCommandTest.txt +++ b/test/data/ListCommandTest.txt @@ -5,3 +5,4 @@ (C) 13 + 29 = 42 x 2014-12-12 Completed but with date:2014-12-12 +hidden item h:1 diff --git a/test/test_list_command.py ...
3
3
0
[{"id": "G0", "claim": "The HiddenTagFilter docstring is copied verbatim from the preceding filter and does not describe what this filter actually does.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The match() docstring misspells 'True' as 'Ture...
null
topydo__topydo__172
topydo/topydo
172
defect
9e13f20be19b8797902fb596683b6f6359d41592
5dff02529a910f74973621f56c22c29509952aae
Add possibility to trigger actions after archiving
Each command can now execute action defined in its own Command.post_archive() method after archiving action is done. Hook for `do` and `del` is also included in this change. This should fix #139
diff --git a/test/test_delete_command.py b/test/test_delete_command.py index cef4bc51..5e2f134b 100644 --- a/test/test_delete_command.py +++ b/test/test_delete_command.py @@ -47,6 +47,7 @@ def test_del1(self): command = DeleteCommand(["1"], self.todolist, self.out, self.error, ...
1
1
0
[{"id": "G0", "claim": "Minor: the method name should carry a verb for readability, e.g. rename `post_archive` to `execute_post_archive_actions`, and the same applies to the new `Transaction` method below.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
topydo__topydo__173
topydo/topydo
173
defect
dea65c346c8de7c59eea6c8a7c81160dcf5f1a86
f17c9a088400445c1ce9920c28a8ea09fa9e3534
Add possibility to list all backups and revert to specific point in history
`topydo revert ls` will give a list of all backup points (one line each) in form: `0 | YYYY-MM-DD HH:mm | label` ~~`topydo revert 2` will revert to backup point marked as 2 (i.e. 3 changes back in history, because we're counting from 0).~~ **Changed in f17c9a0:** Numbering of `topydo revert ls` starts now from **...
diff --git a/test/test_revert_command.py b/test/test_revert_command.py index e539e633..19470c38 100644 --- a/test/test_revert_command.py +++ b/test/test_revert_command.py @@ -77,7 +77,7 @@ def test_revert01(self): result = TodoList(self.archive_file.read()).print_todos() self.assertEqual(self.errors...
6
5
2
[{"id": "G0", "claim": "The tests changed by this pull request were merely fixed to keep checking master's functionality and need extending, leaving the pull request's new behaviour untested (decreased test coverage).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"...
null
topydo__topydo__27
topydo/topydo
27
defect
72a2bed0d8f7978c8d44ae1c32aae3c7138c5711
c9e2f3abe2d23fe2d1c73c295d35ad99e4816d2a
Add possibility to configure colorscheme of topydo
- Add new module `topydo.lib.Colors` and class `Colors` for handling output colors and their ANSI codes. - Create new config options with colors for priorities, projects, contexts, metadata, and links and place them under new section called "colorscheme". Each configurable color is a number from range 0-255 and corres...
diff --git a/topydo.conf b/topydo.conf index f42a311e..ed159674 100644 --- a/topydo.conf +++ b/topydo.conf @@ -30,3 +30,10 @@ ignore_weekends = 1 append_parent_projects = 0 ; Add parent contexts when adding sub todo items append_parent_contexts = 0 + +[colorscheme] +; priority_colors = A:6,B:3,...
8
8
2
[{"id": "G0", "claim": "_int_to_ansi falls off the end and returns nothing when p_int is outside 0-255; it needs an else clause returning the undecorated neutral color code.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The decoration parameter of ...
null
topydo__topydo__30
topydo/topydo
30
defect
61a35f8f8f76429d96499b75ffdc18957283a642
fafe392dd4a70054e84ba99e609ceee9b25f0831
Add todos from file with '-f' flag.
Sometimes I don't have access to my todo.txt file, but I do want to save some todo items. In such cases I'm writing those items into some .txt file and later manually copy-paste them into proper todo.txt. However this way I can't benefit from topydo awesomeness (relative dates, dependencies etc.). This PR solves this i...
diff --git a/topydo/commands/AddCommand.py b/topydo/commands/AddCommand.py index 85777afe..003e94d7 100644 --- a/topydo/commands/AddCommand.py +++ b/topydo/commands/AddCommand.py @@ -34,14 +34,26 @@ def __init__(self, p_args, p_todolist, p_args, p_todolist, p_out, p_err, p_prompt) self.text = ' '....
3
3
1
[{"id": "G0", "claim": "Make from_file hold the filename (using getopt('f:')) instead of a boolean so getopt validates the invocation instead of indexing self.args[0], which may fail when the user passes no filename.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "...
null
topydo__topydo__44
topydo/topydo
44
defect
809d9b8b51636b16bc32d02c48b5241fb4eaf4ed
68afbe8e230607fb06c59d5aad5568ca649730ea
Expression-mode for del, depri, do, pri, postpone.
Expression-mode is so great in `topydo edit` – why not have it also in other "multi commands"?
diff --git a/test/DeleteCommandTest.py b/test/DeleteCommandTest.py index b48f8dda..68ecbe2c 100644 --- a/test/DeleteCommandTest.py +++ b/test/DeleteCommandTest.py @@ -35,6 +35,8 @@ def setUp(self): todos = [ "Foo id:1", "Bar p:1", + "a @test with due:2015-06-03", + ...
4
4
0
[{"id": "G0", "claim": "The _open_in_editor signature change is unrelated to the rest of the change and should be put in a different commit.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "test_multi_del1 and test_multi_del2 should also check the...
null
topydo__topydo__47
topydo/topydo
47
defect
f60572d250c615787dfc3be67416cc049e2a3b13
2b20424508784e6d18995cc65da21130d7f6f149
Introduce backup feature and `revert` command
This is still a work in progress. Right now after execution of each command backup is saved. With `topydo undo` it is possible to revert **todo.txt** and **done.txt** to **latest** saved version. Things TODO: - [x] Properly handle archive file - [x] Limit number of saved backups - [x] Clean backup after successful e...
diff --git a/test/UndoCommandTest.py b/test/UndoCommandTest.py new file mode 100644 index 00000000..245756eb --- /dev/null +++ b/test/UndoCommandTest.py @@ -0,0 +1,125 @@ +# Topydo - A todo.txt client written in Python. +# Copyright (C) 2014 - 2015 Bram Schoenmakers <me@bramschoenmakers.nl> +# +# This program is free s...
21
17
4
[{"id": "G0", "claim": "Combine the backup options into a single boolean, eliminate the backup_file option, and always store the backup file relative to the active todo.txt file, since a configurable/global backup path gets messy with multiple todo.txt files or working directories and can break undo.", "category": "des...
null
topydo__topydo__53
topydo/topydo
53
defect
14b8d76970a218c43df9237375cd9a75986c9203
e47647d86973eabf347ff6f8457c4b9687ec213c
Much more powerful filtering of priorities
Now it is possible to do things like: `ls (>C)` # gives items with D-Z priorities `ls (!E)` # gives all items except those with E priority (also possible with `ls -- -(E)`) and maybe most importantly: `ls (<A)` # gives items without priority If You like it, I'll complete this pull-request with some tests and docstrin...
diff --git a/topydo/lib/ExpressionCommand.py b/topydo/lib/ExpressionCommand.py index bae378ff..765622e7 100644 --- a/topydo/lib/ExpressionCommand.py +++ b/topydo/lib/ExpressionCommand.py @@ -53,6 +53,8 @@ def arg_filters(): for arg in args: if re.match(Filter.ORDINAL_TAG_MATCH, arg): ...
6
6
3
[{"id": "G0", "claim": "The new code duplicates the operator-evaluation logic already in OrdinalTagFilter, so it should be reused through an OrdinalFilter superclass whose subclasses only set the operands while the base class evaluates the operator and operands.", "category": "maintainability", "verdict": "supported", ...
null
topydo__topydo__57
topydo/topydo
57
defect
6838c011fbaadb9da22e79503b5ea27b5e3d883f
d092693a3ea9606c7d482e2a7b3c7d849d0220d8
Aliases
Aliases can now be defined in 'aliases' section of topydo config file. Examples: ``` [aliases] showall = ls -x purge = del -f ical = ls -f ical ```
diff --git a/topydo.conf b/topydo.conf index dcbe9f7c..ef65579d 100644 --- a/topydo.conf +++ b/topydo.conf @@ -46,3 +46,6 @@ append_parent_contexts = 0 ; context_color = magenta ; metadata_color = green ; link_color = light-cyan + +[aliases] +;showall = ls -x diff --git a/topydo/Commands.py b/topydo/Commands.py...
5
5
1
[{"id": "G0", "claim": "An alias should be usable as the default command.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "unclear"}, {"id": "G1", "claim": "The set-difference line building the alias list in Config.aliases() is unclear and needs a clarifying comment, and the list() conversion...
null
topydo__topydo__77
topydo/topydo
77
defect
8cd2a648aca59b9b5cfb19414c8b77643a68eeed
e84440bbd5f0b5e008b9702643a820d69003dac4
Move format parsing logic to ListFormatParser
Main advantage of having separate parser for list_format is possibility of initializing it and resolving placeholders only once. Previous implementation did that with each Todo object. `ListFormatParser` also resolves placeholders differently - it doesn't iterate through a dictionary with placeholders and look for a ma...
diff --git a/test/data/listformat.conf b/test/data/listformat.conf new file mode 100644 index 00000000..653a93f1 --- /dev/null +++ b/test/data/listformat.conf @@ -0,0 +1,2 @@ +[ls] +list_format = |%I| %x %{(}p{)} %c %S\t%K diff --git a/test/test_list_format.py b/test/test_list_format.py index 2119ee36.....
4
3
1
[{"id": "G0", "claim": "The placeholders dict should be moved outside the ListFormatParser class.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "PrettyPrinterFormatFilter should instantiate the parser itself rather than putting that responsibility on the c...
null
topydo__topydo__83
topydo/topydo
83
defect
7f15d0ab5bc03d78602cd62de2bab842ae4f9454
a5f3e80b1a37ec15796a630305d79e022b3a2c50
Alternate for `top` command
The list formatting options combined with aliases make a good combination for providing the `top` command (originally proposed in PR #52) with less duplicated code. This pull request adds to 'mini-features' to provide the `top` command like I'd imagined. - a placeholder space if no priority is specified (`%P`) - an opt...
diff --git a/topydo.conf b/topydo.conf index 82f2e696..a0257ea8 100644 --- a/topydo.conf +++ b/topydo.conf @@ -52,7 +52,7 @@ append_parent_contexts = 0 [aliases] ;showall = ls -x ;next = ls -n 1 -;top = ls -F '|%I| %x %p %S %k %{(}H{)}' +;top = ls -F '%I %x %P %S %k %{(}H{)}' -N ;lsproj = lsprj ;listprj = lsp...
4
4
2
[{"id": "G0", "claim": "The help text for the -n flag misspells 'Defaults' as 'Defualts'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The -N help line should be rephrased to 'Limit number of items such that it fits on the terminal'.", "category...
null
topydo__topydo__84
topydo/topydo
84
defect
7f15d0ab5bc03d78602cd62de2bab842ae4f9454
62cda00216c45590a292968c39cad9b58ed0aa92
Priority command: allow lowercase priorities to be input
Allow both upper- and lowercase priorities to be specified for the `pri` command. So these two commands (now) give the same results: ``` > topydo pri 2 D > topydo pri 2 d ```
diff --git a/test/test_priority_command.py b/test/test_priority_command.py index ec358ffa..57847d23 100644 --- a/test/test_priority_command.py +++ b/test/test_priority_command.py @@ -91,6 +91,16 @@ def test_set_prio6(self): self.assertEqual(self.output, "Priority changed from A to C\n| 1| (C) Foo\nPriority se...
1
1
0
[{"id": "G0", "claim": "The `upper()` call should be applied inside the `normalize_priority` helper, as part of normalization, rather than to the argument at the call site.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
torch-uncertainty__torch-uncertainty__135
torch-uncertainty/torch-uncertainty
135
defect
7d0d345a44ac6ada38372bc6dbce007a00cfeeb5
2522a31c04c73158118f15a884c5d9a2d12f30b2
:bug: Fix MNIST test dataloader for shifted data
Testing on the `MNISTDataModule` inside a `ClassifcationRoutine` with `eval_shifted=True` set would raise a `ValueError("No samples to concatenate")` when `self.test_shift_metrics.compute()` was called inside the `ClassificationRoutine`, because `test_dataloader()` did not actually return the test dataloader with the...
diff --git a/torch_uncertainty/datamodules/classification/mnist.py b/torch_uncertainty/datamodules/classification/mnist.py index a49fc1689..d50421bfa 100644 --- a/torch_uncertainty/datamodules/classification/mnist.py +++ b/torch_uncertainty/datamodules/classification/mnist.py @@ -171,10 +171,12 @@ def test_dataloader(s...
2
2
1
[{"id": "G0", "claim": "The docstring should move the MNISTC (shifted data) mention to the end so that the documented dataloader order matches the code.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MNISTC should not have a shift_severity paramet...
null
torch-uncertainty__torch-uncertainty__137
torch-uncertainty/torch-uncertainty
137
defect
7d0d345a44ac6ada38372bc6dbce007a00cfeeb5
18dacb376545b3a6355a81f0ab827763647abc27
✨ LeNet BatchEnsemble and Deep Ensemble + minor bugfixes
This PR introduces the following improvements and fixes: - **Bug Fixes:** Address minor issues in some of the existing LeNet configs. - **BatchEnsemble Wrapper:** Implements a wrapper that replicates the input batch `num_estimator` times, eliminating the need to hardcode this for each model. - **Documentation Upda...
diff --git a/experiments/classification/mnist/configs/lenet_batch_ensemble.yaml b/experiments/classification/mnist/configs/lenet_batch_ensemble.yaml new file mode 100644 index 000000000..0d2a94ee2 --- /dev/null +++ b/experiments/classification/mnist/configs/lenet_batch_ensemble.yaml @@ -0,0 +1,67 @@ +# lightning.pytorc...
8
6
2
[{"id": "G0", "claim": "The new ensemble-requirements admonition added to the ClassificationRoutine docstring should be a Note rather than a Warning.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The BatchEnsemble wrapper docstring uses 3rd perso...
null
torch-uncertainty__torch-uncertainty__144
torch-uncertainty/torch-uncertainty
144
defect
dba4bcfc1bded1eb76005338a2a918cd8e4217bf
cfdb70eb5e22b68487e1d265836aacab14c95618
:hammer: Improve the corruption transforms
How should we deal with the fact that Hendryck chose different corruption parameters depending on the image size? (should we deal with it?) - I decided not to take it into account. I'll write something about this in the header. Ideally, we should also add tests for datasets/corrupted.py, but this directory has be...
diff --git a/README.md b/README.md index e0f735a49..1e476b03d 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ This package provides a multi-level API, including: - easy-to-use :zap: lightning **uncertainty-aware** training & evaluation routines for **4 tasks**: classification, probabilistic and pointwise re...
2
2
0
[{"id": "G0", "claim": "The purpose of the new `name: str` attribute on TUCorruption is unclear and it should be removed.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G2", "claim": "MotionBlur could draw the random offsets directly with `self.rng.uniform(size=(1,1)+s...
null
torch-uncertainty__torch-uncertainty__153
torch-uncertainty/torch-uncertainty
153
defect
b0dd7c91a45db0454d36dd3364e85110d609dae0
a3f53b3d3a26dd36df1fe4506f28fdef38718388
:hammer: Rework OOD criteria
To be done before merging: - [x] Add documentation for all new classes - [x] Add the classes to the API Reference - [x] Fill coverage
diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 26ebcb894..4e0763794 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -46,12 +46,9 @@ and its parameters. # ... eval_ood: bool = False, eval_grouping_loss: bool = False, - ood_criterion: Liter...
3
3
1
[{"id": "G0", "claim": "The API reference documentation should be updated to make finding OODCriterion objects easier.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The quickstart documentation's ood_criterion type annotation should not be 'TUOOD...
null
torch-uncertainty__torch-uncertainty__172
torch-uncertainty/torch-uncertainty
172
defect
921c2e68a0d050416ab2036ed0de2cf7f3093aac
4dd635177d414ba83c84777a5cfd3f65ac8ae231
:sparkles: Enable preprocessing without model
Will resolve #164
diff --git a/tests/post_processing/test_scalers.py b/tests/post_processing/test_scalers.py index b499efc5b..be3c952e8 100644 --- a/tests/post_processing/test_scalers.py +++ b/tests/post_processing/test_scalers.py @@ -59,12 +59,6 @@ def test_errors(self): with pytest.raises(ValueError): scaler.set_...
2
1
0
[{"id": "G0", "claim": "The ImportError message concatenates 'install' and 'torch_uncertainty' without a space, producing 'installtorch_uncertainty'; add the missing space.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Two issues: scaler.py uses ...
null
torch-uncertainty__torch-uncertainty__233
torch-uncertainty/torch-uncertainty
233
defect
179fa3740e3f900800424891b40033a579ee6fa2
a7478911e78b85be05847a3335badb7a622a16c5
:memo: minor doc update
Added some docstrings, fixed some legacy docstrings too. Also refactored Resnet models: 1. Replaced ResNet style by an enum (to be potentially extended later. Ensured backward compatibility. 2. Rewrote the ResNet block number function for better legibility.
diff --git a/auto_tutorial_source/Data_Augmentation/tutorial_mixup_ensembles_mixupmp.py b/auto_tutorial_source/Data_Augmentation/tutorial_mixup_ensembles_mixupmp.py index f8f20dce9..f7b61824d 100644 --- a/auto_tutorial_source/Data_Augmentation/tutorial_mixup_ensembles_mixupmp.py +++ b/auto_tutorial_source/Data_Augmenta...
4
4
1
[{"id": "G0", "claim": "The docstring's Returns type for lpbnn_resnet should say `_LPBNNResNet` instead of `_PackedResNet`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring for lpbnn_resnet documents a `linear_implementation` argument ...
null
torch-uncertainty__torch-uncertainty__243
torch-uncertainty/torch-uncertainty
243
defect
67b7a3dd7f189324facb1353b3ce1a60eb5772ca
1c3fdcb631dfb161810d5b934a9e97614b017155
Fix bugs and docstring issues in packed.py
Bug fixes: - PackedLinear: fix operator precedence bug in extended_out_features divisibility check ( % num_estimators * gamma → % (num_estimators * gamma)) - PackedConvTranspose2d.forward: apply rearrange when last=True, consistent with all other packed conv layers - PackedTransformerDecoderLayer: fix norm3 using al...
diff --git a/src/torch_uncertainty/layers/packed.py b/src/torch_uncertainty/layers/packed.py index fd4c9edcf..392eb7676 100644 --- a/src/torch_uncertainty/layers/packed.py +++ b/src/torch_uncertainty/layers/packed.py @@ -15,7 +15,7 @@ def check_packed_parameters_consistency(alpha: float, gamma: int, num_estimators ...
7
5
2
[{"id": "G0", "claim": "The divisibility handling in PackedLinear (the extended_out_features check and the silent patching of non-divisible features) is questionable: the reviewer asked whether this very particular case was tested and suggested at least logging a warning when dimensions are silently adjusted, with the ...
null
torch-uncertainty__torch-uncertainty__56
torch-uncertainty/torch-uncertainty
56
defect
a7f6a3269790d80e48e0718ad95c06ae3c2271a8
b2b9d4acf1d3031e66f945b033f699a7543bc49b
:sparkles: Add evidential classification
- [x] Handle the number of epochs for the simulated annealing - [x] Add the method to the ReadMe
diff --git a/auto_tutorials_source/tutorial_dec_cubic.py b/auto_tutorials_source/tutorial_dec_cubic.py new file mode 100644 index 000000000..dbc712c2b --- /dev/null +++ b/auto_tutorials_source/tutorial_dec_cubic.py @@ -0,0 +1,213 @@ +#!/usr/bin/env python +# coding: utf-8 + +""" +Deep Evidential Classification on a Toy...
10
7
4
[{"id": "G0", "claim": "The RST title underline of the DEC tutorial is shorter than the title and should be completed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The DEC tutorial needlessly imports ResNet and passes it to init_args instead of ...
null
torch-uncertainty__torch-uncertainty__68
torch-uncertainty/torch-uncertainty
68
defect
bfbae6bb6c3c7b6c4e67d4cf527053099c442171
48bd01a96bbde43834378b0317082c6f1ff42fd0
✨ Sparsification metric and plot methods for Calibration Error
- [x] Add Sparsification Error from Ilg et al., Uncertainty estimates and multi-hypotheses for optical flow. In ECCV, 2018. - [x] Create wrapper classes for `BinaryCalibrationError` and `MulticlassCalibrationError` to provide plotting methods. - [x] Write Tests - [x] Update Documentation - [x] Update the calibratio...
diff --git a/auto_tutorials_source/tutorial_scaler.py b/auto_tutorials_source/tutorial_scaler.py index ef501c489..48f8ae843 100644 --- a/auto_tutorials_source/tutorial_scaler.py +++ b/auto_tutorials_source/tutorial_scaler.py @@ -27,13 +27,14 @@ """ import torch -from torchmetrics import CalibrationError from tor...
3
3
0
[{"id": "G0", "claim": "Delete the commented-out CalibrationPlot import (and related commented lines) from the scaler tutorial.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a `#coverage: ignore` to the unreachable `raise ValueError(f\"Not ...
null
torch__torch7__382
torch/torch7
382
defect
34ff49449c535f8da8b36abdafb7acc9ac3a98fa
8ef12334ec4a645a970c3b4963a32d00e768144b
patch to luaT.c allowing for nested modules
Patch allows for declaration of 'nested' modules/classes, e.g., `torch.class('A.b.c')`, where `b` is a module in package `A` and `c` is a submodule of `b`. If a specified module path is invalid, error report will now indicate where said path goes wrong. By way of example: If module `c` is declared with path `A.b.c`, ...
diff --git a/lib/luaT/luaT.c b/lib/luaT/luaT.c index ee74c9298..ec9b5d34c 100644 --- a/lib/luaT/luaT.c +++ b/lib/luaT/luaT.c @@ -497,27 +497,77 @@ int luaT_classmodulename(const char *tname, char *module_name) return tname[n] == '.'; } -/* Lua only functions */ -int luaT_lua_newmetatable(lua_State *L) +/* Method ...
5
5
3
[{"id": "G0", "claim": "The behaviour of the name getters for nested modules should be clarified and defined: luaT_classrootname should return the innermost component (behaving like luaT_classname), and luaT_classmodulename should return the full parent (a.b for a.b.c) rather than the root.", "category": "design", "ver...
null
torchgeo__torchgeo__1063
torchgeo/torchgeo
1,063
defect
098f58026fae5db660a920c868d533cdcd5006d7
349a1de73faccde6497f46414c877da59a1ece9d
Remove scikit-learn
We only use sklearn for GroupShuffleSplit. Reimplementing our own version to remove this dependency.
diff --git a/environment.yml b/environment.yml index 255ee4df57b..9ea120d38f1 100644 --- a/environment.yml +++ b/environment.yml @@ -41,7 +41,6 @@ dependencies: - radiant-mlhub>=0.2.1,<0.5 - rtree>=1 - scikit-image>=0.18 - - scikit-learn>=0.21 - scipy>=1.6.2 - segmentation-models-pytorch>=0....
7
5
1
[{"id": "G0", "claim": "The new group_shuffle_split function has no type hints on its parameters or return values.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If the group splitting function is kept, it should be prefixed with an underscore s...
null
torchgeo__torchgeo__1337
torchgeo/torchgeo
1,337
defect
e26213409de8e300913839b69274a6664ad062c0
1f2acb4ed95088d1c4c722d710a79260fc482ae7
Add year filter functionality CDL
This PR adds `years` argument to select a number of years for which to download CDL or use CDL so the user doesn't have to download all 15 years. This is how we decided to implement it for NLCD as well.
diff --git a/tests/datasets/test_cdl.py b/tests/datasets/test_cdl.py index 16a68b06f28..da2c735a77a 100644 --- a/tests/datasets/test_cdl.py +++ b/tests/datasets/test_cdl.py @@ -27,17 +27,23 @@ class TestCDL: def dataset(self, monkeypatch: MonkeyPatch, tmp_path: Path) -> CDL: monkeypatch.setattr(torchgeo.d...
7
5
1
[{"id": "G0", "claim": "If the years parameter defaults to something, it should default to the most recent year rather than 2019.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring should use correct Sphinx directive syntax ('.. versionadded:: ...
null
torchgeo__torchgeo__1339
torchgeo/torchgeo
1,339
defect
6ce1c4ef659e1fa497985f64a1c3a36ad63ca3a1
c2d240315f1004f8aba875915fbe86624982f07d
Add empirical sampling mode to the RCF model
The MOSAIKS paper describes RCF, which we've already implemented, and this method (which I'll call MOSAIKS). This method is the same setup as RCF but instead of initializing the conv kernels randomly, you sample patches from the dataset, do ZCA whitening, and use those as the kernels. In some little experiments on Euro...
diff --git a/torchgeo/models/__init__.py b/torchgeo/models/__init__.py index e1b20236e47..9200e81c535 100644 --- a/torchgeo/models/__init__.py +++ b/torchgeo/models/__init__.py @@ -8,7 +8,7 @@ from .farseg import FarSeg from .fcn import FCN from .fcsiam import FCSiamConc, FCSiamDiff -from .rcf import RCF +from .rcf ...
7
7
1
[{"id": "G0", "claim": "Documentation for the new model still needs to be added to the docs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests for the new sampling functionality still need to be added.", "category": "testing", "verdict": "suppo...
null
torchgeo__torchgeo__1358
torchgeo/torchgeo
1,358
defect
8177947f0a88bb3cf196a9f898e2b818287bf24c
011d2ff587188b8132cf8d58e57f7c8690a17c0b
Satlas pretrained Swin Transformer v2 models
Adds Swin Transformer v2 Base pretrained models from the [Satlas](https://github.com/allenai/satlas) dataset
diff --git a/docs/api/models.rst b/docs/api/models.rst index 4e9889c1f1c..8fbc2668d41 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -45,6 +45,18 @@ ResNet :align: center :file: resnet_pretrained_weights.csv +Swin Transformer +^^^^^^^^^^^^^^^^^^ + +.. autofunction:: swin_v2_b +.. autoclass:: Sw...
3
3
1
[{"id": "G0", "claim": "pyproject.toml also needs its minimum torch/torchvision versions updated (as requirements/min-reqs.old was), since the PR's swin_v2_b models require torchvision 0.14+.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The Satlas...
null
torchgeo__torchgeo__1684
torchgeo/torchgeo
1,684
defect
4126f464abe1b33d916c61b947843c5578906100
7355d7c6aa54b2d040afb68b8047139d6508eb24
OSCD: fine-grained band selection, separate images
Closes https://github.com/microsoft/torchgeo/issues/1683 Tested with ```python class CustomSemanticSegmentationTask(SemanticSegmentationTask): def plot(self, sample): image1 = sample["image1"] image2 = sample["image2"] mask = sample["mask"] prediction = sample["predictio...
diff --git a/torchgeo/datamodules/oscd.py b/torchgeo/datamodules/oscd.py index 748c4038091..39239304287 100644 --- a/torchgeo/datamodules/oscd.py +++ b/torchgeo/datamodules/oscd.py @@ -16,6 +16,38 @@ from .geo import NonGeoDataModule from .utils import dataset_split +MEAN = { + "B01": 1583.0741, + "B02": 1374...
9
9
2
[{"id": "G0", "claim": "The remaining `x[\"image\"]` assertions in `test_getitem` still need to be updated for the new `image1`/`image2` sample keys.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G2", "claim": "`all_band_names` should be renamed to `all_bands` to mat...
null
torchgeo__torchgeo__1707
torchgeo/torchgeo
1,707
defect
32a73073294eba58feeba54b4de0b76cf23efadb
d2e438e95ae5db3a55a89583e6dfc49ac20710ec
Add data module for LEVIR-CD+ dataset
Close https://github.com/microsoft/torchgeo/issues/1706
diff --git a/tests/datamodules/test_levircd.py b/tests/datamodules/test_levircd.py new file mode 100644 index 00000000000..cea23993dc6 --- /dev/null +++ b/tests/datamodules/test_levircd.py @@ -0,0 +1,61 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import os + +im...
4
3
1
[{"id": "G0", "claim": "The LEVIRCDPlusDataModule class docstring needs an `.. versionadded:: 0.6` directive.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "No tests should require internet access; the datamodule tests should use the fake data com...
null
torchgeo__torchgeo__1713
torchgeo/torchgeo
1,713
defect
94d0619fe549ec4e5755cdc8727c5a0d951fe135
6a9679ac8acf06358d3cd055b0128f5017baaa05
Fix Download Link AGB Live Woody Biomass dataset
Closes #1679 by updating the download link.
diff --git a/tests/data/agb_live_woody_density/Aboveground_Live_Woody_Biomass_Density.geojson b/tests/data/agb_live_woody_density/Aboveground_Live_Woody_Biomass_Density.geojson index 169191641e1..7beec3e9db3 100644 --- a/tests/data/agb_live_woody_density/Aboveground_Live_Woody_Biomass_Density.geojson +++ b/tests/data/a...
1
1
0
[{"id": "G0", "claim": "Put the dataset URL assignment on one line and ignore the line-length limit.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "pre_existing"}]
null
torchgeo__torchgeo__1814
torchgeo/torchgeo
1,814
defect
43d713361444ecc2005f97546dbca2b77c5a256a
308b748c1b790a9d5cc4efedae0330a8db01b46b
VectorDataset: extract mint/maxt from filename
Opening PR after a discussion on Slack: https://torchgeo.slack.com/archives/C02DD9Q76SE/p1705589213060449
diff --git a/torchgeo/datasets/geo.py b/torchgeo/datasets/geo.py index 4c98b048e62..234609d31b1 100644 --- a/torchgeo/datasets/geo.py +++ b/torchgeo/datasets/geo.py @@ -624,6 +624,7 @@ def __init__( # Populate the dataset index i = 0 + filename_regex = re.compile(self.filename_regex, re.VERBO...
3
3
3
[{"id": "G0", "claim": "Copy the filename_regex/date_format attributes and their docstrings from RasterDataset to VectorDataset, removing the lines not applicable to vectors.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Tests are needed for the ne...
null
torchgeo__torchgeo__1873
torchgeo/torchgeo
1,873
defect
842aef791087a4ec821a650310a8e60e21cfe1d2
dc0cb8983d6d9b7c2dd5bac8d6769275af2ba614
Add AgriFieldNet datamodule
This PR adds the AgriFieldNet datamodule. The training uses satellite images included in the original dataset. We can experiment more with the Sentinel-2 raw scenes.
diff --git a/docs/api/datamodules.rst b/docs/api/datamodules.rst index 00c0fb998bd..4cc2ff0bd99 100644 --- a/docs/api/datamodules.rst +++ b/docs/api/datamodules.rst @@ -6,6 +6,11 @@ torchgeo.datamodules Geospatial DataModules ---------------------- +AgriFieldNet +^^^^^^^^^^^^ + +.. autoclass:: AgriFieldNetDataModul...
2
1
1
[{"id": "G0", "claim": "Just make sure the default values of mean/std are correct for this dataset.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "This has a different percentage than CDL. Why?", "category": "correctness", "verdict": "supported", "p...
null
torchgeo__torchgeo__1903
torchgeo/torchgeo
1,903
defect
c7e066f71532eddc17f3ea225f6a205b72b77588
6ea3c4080fa95ebf55a37aee7b6ed4e693d89b47
Add DOFA model
Adding support for the DOFA, a unified foundation model for Remote sensing data
diff --git a/docs/api/agnostic_pretrained_weights.csv b/docs/api/agnostic_pretrained_weights.csv new file mode 100644 index 00000000000..52dcc4d34da --- /dev/null +++ b/docs/api/agnostic_pretrained_weights.csv @@ -0,0 +1,2 @@ +Weight,Source,Citation,License +DOFABase16_Weights.DOFA_MAE,`link <https://github.com/ShadowX...
10
9
0
[{"id": "G0", "claim": "The Dynamic_MLP_OFA class should be renamed without the underscores, e.g. DOFAMLP.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Nothing about the wv_planes parameter or its description gives any idea what it actually is...
null
torchgeo__torchgeo__1908
torchgeo/torchgeo
1,908
defect
0e2c76d36aa3a3c87aeb8abea74532e3003f8ec9
4d7bbeecec8f0c744523d2af011373ae8862e41b
Implement deterministic GeoDataset
Fixes #1899.
diff --git a/tests/datasets/test_geo.py b/tests/datasets/test_geo.py index 0e1a4ce17e3..3054208e96b 100644 --- a/tests/datasets/test_geo.py +++ b/tests/datasets/test_geo.py @@ -76,6 +76,15 @@ class TestGeoDataset: def dataset(self) -> GeoDataset: return CustomGeoDataset() + @pytest.fixture(scope="cla...
1
1
0
[{"id": "G0", "claim": "The class-scoped 'files' fixture added in tests/datasets/test_geo.py is overkill and should be simplified to a plain class variable (or moved into the single test that uses it).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
torchgeo__torchgeo__1931
torchgeo/torchgeo
1,931
defect
e2421ea046961069d96984844acee15db1ea79d7
e5c5da0ee90c9aa1211548b4cbf4d91c56767171
Resolve multiple SimCLR and MoCo lightly warnings
This PR consists of 3 commits: 1. Configure the model first 2. Specify the feature dimension of the memory bank 3. Only test one warning at a time 1 is only needed for 2. The alternative would be to make `hidden_dim` and `output_dim` non-optional. This is already the case in MoCo, but not yet the case in SimCLR...
diff --git a/torchgeo/trainers/base.py b/torchgeo/trainers/base.py index 3a44c047a31..878034a77f2 100644 --- a/torchgeo/trainers/base.py +++ b/torchgeo/trainers/base.py @@ -36,9 +36,13 @@ def __init__(self, ignore: Optional[Union[Sequence[str], str]] = None) -> None: """ super().__init__() se...
3
1
1
[{"id": "G0", "claim": "The new-signature NTXentLoss call added by this PR crashes on lightly versions older than 1.4.25 unless the minimum lightly version is bumped or try/except handling is added.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
torchgeo__torchgeo__2086
torchgeo/torchgeo
2,086
defect
5cfbd6512dd1438190388a99d411caca7651eeb3
110b64d029b80da9b31568aca46356571903f6d5
GlobBiomass: several bug fixes
This PR fixes the following bugs: - [x] GlobBiomass data is from 2010, although it isn't in the filename - [x] Mask is for pixelwise regression, use float32, not long - [x] Length of dataset was doubled due to unspecific filename_glob I also improved the documentation to include definitions and units of AGB and...
diff --git a/tests/datasets/test_globbiomass.py b/tests/datasets/test_globbiomass.py index 94309f677a6..2e31b7b2222 100644 --- a/tests/datasets/test_globbiomass.py +++ b/tests/datasets/test_globbiomass.py @@ -47,6 +47,9 @@ def test_getitem(self, dataset: GlobBiomass) -> None: assert isinstance(x['crs'], CRS) ...
1
1
0
[{"id": "G0", "claim": "There may be an extra 0 in the second number — the dataset height should read 45,000 px, not 45,0000 px.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
torchgeo__torchgeo__2199
torchgeo/torchgeo
2,199
defect
900e8a1e74f5c2aa87837f878851abcc2d37c270
b7e461104f62c23b4f1712ea15f03fa362a3df29
Rename bbox -> bounds
'bbox' in kornia augmentations is used to identify bounding boxes of instances in an image. However, in GeoDatasets, bbox refers to the geographic bounds of the data. This PR aims to make these distinct by renaming 'bbox' in GeoDatasets to 'geo_bbox' `bounds` could also be another option.
diff --git a/tests/data/western_usa_live_fuel_moisture/data.py b/tests/data/western_usa_live_fuel_moisture/data.py index 44fc8717b47..7d81bd3bc11 100755 --- a/tests/data/western_usa_live_fuel_moisture/data.py +++ b/tests/data/western_usa_live_fuel_moisture/data.py @@ -172,7 +172,7 @@ 'type': 'text/csv', ...
1
1
1
[{"id": "G0", "claim": "The 'bbox' key in tests/data/western_usa_live_fuel_moisture/data.py was changed to 'bounds' by accident and should be reverted.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
torchgeo__torchgeo__2219
torchgeo/torchgeo
2,219
defect
e973c1e3ca126f9f76573f43d8bfba910fa78efa
467740c03661874e693737a5132be8bb1c5a77eb
Trainers: support binary, multiclass, and multilabel tasks
Instead of having separate trainers for binary, multiclass, and multilabel, let's create a single trainer that can handle all 3. This applies to both Classification and Semantic Segmentation but not to our other trainers. ### Deprecation Note `MultiLabelClassificationTask(num_classes=...)` is deprecated, use `...
diff --git a/tests/conf/bigearthnet_all.yaml b/tests/conf/bigearthnet_all.yaml index b6218986070..b06cc58b224 100644 --- a/tests/conf/bigearthnet_all.yaml +++ b/tests/conf/bigearthnet_all.yaml @@ -4,7 +4,8 @@ model: loss: "bce" model: "resnet18" in_channels: 14 - num_classes: 19 + task: "multilabel...
5
2
2
[{"id": "G0", "claim": "The separate num_classes and num_labels parameters could be merged into a single num_classes used for both multiclass and multilabel tasks.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "MultiLabelClassificationTask should be deprec...
null
torchgeo__torchgeo__2233
torchgeo/torchgeo
2,233
defect
880593e7efe2670aabad2b0b0f27be34161f15fb
63f14fe26d08a22ea56bfcf175d2481b709552c9
RasterDataset: support date_str containing % character
A simple logic to replace %% with a placeholder string in _disambiguate_timestamp_ before parsing the date string and reverting it back afterward
diff --git a/torchgeo/datasets/utils.py b/torchgeo/datasets/utils.py index aa8da3a8c82..59131b11c3e 100644 --- a/torchgeo/datasets/utils.py +++ b/torchgeo/datasets/utils.py @@ -308,9 +308,12 @@ def disambiguate_timestamp(date_str: str, format: str) -> tuple[float, float]: Returns: (mint, maxt) tuple for i...
3
3
2
[{"id": "G0", "claim": "The %%->TEMP_PERCENT_PLACEHOLDER replacement added to disambiguate_timestamp is unnecessary (strptime may already handle a literal %%) and won't work unless date_str also contains the placeholder; a simpler approach such as stripping %% from the format after strptime should be used instead.", "c...
null
torchgeo__torchgeo__2296
torchgeo/torchgeo
2,296
defect
6cee6b4a84667ae12a1fdb29abc16ae78378ce30
518fe63050a1c2f260548af32e0915311e926b38
Add Fields Of The World field boundary delineation dataset
Dataset for field boundary delineation -- https://beta.source.coop/repositories/kerner-lab/fields-of-the-world/description/ **Note**: this PR adds the pyarrow dependency as this is needed by Pandas to read parquet files. To-Do: - [x] Dataset - [x] Example plots - [x] Fake data - [x] Tests ![image](https:...
diff --git a/docs/api/datasets.rst b/docs/api/datasets.rst index 60220c8174f..b057b42b51e 100644 --- a/docs/api/datasets.rst +++ b/docs/api/datasets.rst @@ -282,6 +282,11 @@ FAIR1M .. autoclass:: FAIR1M +Fields Of The World +^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: FieldsOfTheWorld + FireRisk ^^^^^^^^ diff --git ...
10
8
1
[{"id": "G0", "claim": "pyarrow==15.0.0 is a questionable minimum pin: pyarrow<15.0.0 has no explicit numpy dependency but fails when numpy>=2 is installed, so the pin and its placement should be reconsidered.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "c...
null
torchgeo__torchgeo__2422
torchgeo/torchgeo
2,422
defect
f76cb9de6457af5bba9a599d06b80bb8b70682eb
7e5ba826838c9937da3ba36269e8a206902eba10
Add ChangeDetectionTask
This PR is to add a change detection trainer as mentioned in #2382. Key points/items to discuss: - I used the OSCD dataset to test with and modified this dataset to use a temporal dimension. - With the added temporal dimension, Kornia’s `AugmentationSequential` doesn’t work, but can be combined with `VideoSequenti...
diff --git a/tests/conf/oscd.yaml b/tests/conf/oscd.yaml new file mode 100644 index 00000000000..264f17334d0 --- /dev/null +++ b/tests/conf/oscd.yaml @@ -0,0 +1,17 @@ +model: + class_path: ChangeDetectionTask + init_args: + loss: 'ce' + model: 'unet' + backbone: 'resnet18' + in_channels: 13 + num_class...
31
26
7
[{"id": "G0", "claim": "The FocalJaccardLoss class belongs in torchgeo/losses/ rather than in the trainer module.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "With the image channels stacked, the config's in_channels may need to be 2 * 13 rather than 1...
null
torchgeo__torchgeo__2602
torchgeo/torchgeo
2,602
defect
1eb43011d3c2e85d71f5006fab464a1584eb877b
d68d87a623d5b3790ca352c04d34570ed8ae0eca
ObjectDetectionTask: support for non-RGB imagery (SAR, MSI, HSI)
We don't yet have a non-RGB object detection dataset to test with, but I'm pretty sure this works. Needed to bump some deps and throw away some tests to get it to work. Closes #1156
diff --git a/pyproject.toml b/pyproject.toml index 5b50f776609..5825106e7aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,12 +67,12 @@ dependencies = [ "rasterio>=1.3,!=1.4.0,!=1.4.1,!=1.4.2", # rtree 1+ required for Python 3.10 wheels "rtree>=1", - # segmentation-models-pytorch 0.2+ require...
1
1
1
[{"id": "G0", "claim": "When adapting the backbone's first convolution to non-RGB input, the layer's `in_channels` attribute must also be set to the new value, otherwise it stays 3 and could cause a silent bug later.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
torchgeo__torchgeo__2646
torchgeo/torchgeo
2,646
defect
54cdd7bafafafe9c8cf3f6dd391e3779c8a64373
0f343bfab55a2f0d91b5452e98b644e0cc89a500
Add Copernicus-FM
Add [Copernicus-FM](https://github.com/zhu-xlab/Copernicus-FM/tree/main/Copernicus-FM), an extension of the [DOFA](https://github.com/zhu-xlab/DOFA) foundation model, able to process any spectral or non-spectral sensor modality using extended dynamic hypernetworks and flexible metadata encoding. Key features: - **A...
diff --git a/docs/api/models.rst b/docs/api/models.rst index f69de42235a..dcdb95c7f5d 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -10,6 +10,13 @@ Change Star .. autoclass:: ChangeStarFarSeg .. autoclass:: ChangeMixin +Copernicus-FM +^^^^ + +.. autoclass:: CopernicusFM +.. autofunction:: copernicus...
9
7
3
[{"id": "G0", "claim": "Downloading the predefined varname embeddings into the models/ directory may not be a good idea and a better location should be found.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The error message typo should be fixed: it shoul...
null
torchgeo__torchgeo__2659
torchgeo/torchgeo
2,659
defect
0ed8d080949f6d26a650536cec337d3816527763
62bc2172d245003b392b9376c52909b976d99e9f
Fix Pretrained ResNet/ViT not working when features_only=True
Fix the AssertionError raised when pretrained ResNet/ViT models (from timm) were created with `features_only = True`. ResNet18 and Swin models were not affected by the issue (Swin models are created with torchvision instead of timm). Closes [#2640](https://github.com/microsoft/torchgeo/issues/2640).
diff --git a/torchgeo/models/resnet.py b/torchgeo/models/resnet.py index 7bbeab22dc8..135024b9451 100644 --- a/torchgeo/models/resnet.py +++ b/torchgeo/models/resnet.py @@ -9,6 +9,7 @@ import timm import torch from timm.models import ResNet +from timm.models._features import FeatureListNet from torchvision.models._...
3
2
1
[{"id": "G0", "claim": "Do not import FeatureListNet from the private timm.models._features module, since private modules may change; prefer a public type such as nn.Module.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The minimum supported timm versio...
null
torchgeo__torchgeo__2687
torchgeo/torchgeo
2,687
defect
685680960d286333ffb726d945ee7954c17675fc
e6dfb9fa434bd63b0ef009d9fa812657224bc24c
Models: fix features_only loading, avoid redundant weight tests
TorchGeo now has a whopping 93 builtin pre-trained model weights. These weights have become prohibitively expensive to test, resulting in a significant slowdown and intermittent test failures. This PR is designed to resolve this issue. ### Before At the moment, we test all model weights roughly 6 times: with `fea...
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d35a03f10a5..6a4fd915ad8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: run: pip list - name: Run pytest checks run: | - pytest --cov=torchgeo --cov-repo...
2
1
0
[{"id": "G0", "claim": "The expanded assertion in vit.py should explain why the set of acceptable unexpected keys grew.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tests should auto-fail if they run longer than 10 minutes so that excessiv...
null
torchgeo__torchgeo__2707
torchgeo/torchgeo
2,707
defect
12c2b5e5489494ce8245b821109cf24f36289793
45aca9928ff1bda6f77aa2a7dcdfc497f4ef66b7
Update class_weights to support list[float]
Close https://github.com/microsoft/torchgeo/issues/2060 Could be cleaner to deprecate tensor support, not sure if there is a process to this? Validated with ``` trainer: max_epochs: 1 model: class_path: ClassificationTask init_args: model: 'resnet18' in_channels: 13 num_classes: 10 ...
diff --git a/tests/trainers/test_classification.py b/tests/trainers/test_classification.py index 3e6121ef188..8d212126e01 100644 --- a/tests/trainers/test_classification.py +++ b/tests/trainers/test_classification.py @@ -189,6 +189,22 @@ def test_weight_str_download(self, weights: WeightsEnum) -> None: num...
6
5
2
[{"id": "G0", "claim": "Use warnings.deprecated or explicitly raise a DeprecationWarning to signal the deprecation instead of handling it implicitly.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "This change may have broken the tests/models/test_coperni...
null
torchgeo__torchgeo__2709
torchgeo/torchgeo
2,709
defect
1f9cc3d31aba6fd0dfac242fb6cd4a8e463701ab
e860a8942f9041afe075e80e571f8e83bdea4e57
Plot Method Added to EDDMapS Dataset
Hi everyone, this is my first contribution ever, I hope this is suffice - Relevant issue: #2377 - Added contextily as dependecy to plot the basemap - Added plot method to eddmaps dataset. The plot will take an object returned by `__getitem__` method and will plot it accordingly based on the longitude, latitude, a...
diff --git a/pyproject.toml b/pyproject.toml index 0b16f04def3..154dbfa4cfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,6 +106,8 @@ datasets = [ "webdataset>=0.2.4", # xarray 0.12.3+ required for pandas 1.3.3 support "xarray>=0.12.3", + # for geographical plotting and basemaps + "conte...
3
3
2
[{"id": "G0", "claim": "TorchGeo should not gain an additional (required) dependency just for a single dataset — the plotting should be done without contextily, or at most with contextily as an optional dependency; the author was also asked to share a picture of the resulting plot.", "category": "design", "verdict": "s...
null
torchgeo__torchgeo__2719
torchgeo/torchgeo
2,719
defect
7569ed11a92b10b210db718182cb76392f4dabfb
2d7c9d23226ff2495fcf9ee5dc0d16ea62461f8a
FTW U-Net Models
This PR adds the 4 pretrained smp U-Net models from the FTW project. This is our first pretrained U-Net weights so some thoughts I have are `UNet` or `Unet`? smp instantiates the class like `smp.Unet`. Also the `ftw-baselines` repo doesn't indicate what version of commercial and noncommercial licenses they use, j...
diff --git a/docs/api/models.rst b/docs/api/models.rst index f4a0928cc54..ac69fe2347c 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -89,6 +89,13 @@ Panopticon .. autofunction:: panopticon_vitb14 .. autoclass:: Panopticon_Weights +U-Net +^^^^^ + +.. autofunction:: unet +.. autoclass:: Unet_Weights + ...
5
4
2
[{"id": "G0", "claim": "Adding the unet model to the models API makes mypy report 'Cannot call function of unknown type' for the `_model[name](*args, **kwargs)` lookup in torchgeo/models/api.py, and the author asks for a suggested fix.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "int...
null
torchgeo__torchgeo__2759
torchgeo/torchgeo
2,759
defect
6f1ef94fe4bd88b8d7f2d9f4407e9581614775cb
71500c66ccf6b2c1513284fc3ed36b34a63c0932
Plot Method Added to MMEarth Dataset
- Relevant issue: https://github.com/microsoft/torchgeo/issues/2377 - Added plot method to MMEarth dataset. - Added test case for the plot method Using the dataset from test, this is how the plot looks like ![image](https://github.com/user-attachments/assets/61f8963d-38d2-464f-a10f-91f41008aed1)
diff --git a/tests/datasets/test_mmearth.py b/tests/datasets/test_mmearth.py index 12117080e0e..8b356d07880 100644 --- a/tests/datasets/test_mmearth.py +++ b/tests/datasets/test_mmearth.py @@ -5,10 +5,12 @@ import shutil from pathlib import Path +import matplotlib.pyplot as plt import pytest import torch import ...
5
4
2
[{"id": "G0", "claim": "Use the official color maps for ESA WorldCover and Dynamic World in the plot instead of the generic rendering.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The plot could probably be limited to the modalities shown in Fig. ...
null
torchgeo__torchgeo__2828
torchgeo/torchgeo
2,828
defect
8d10694421f83b702cfa098f2fddfd7ee656fb84
12ef41ac83da7a42f18d59d4957cc7cd212ac1bd
New SMP Decoders
This PR adds the newly supported SMP decoders (UPerNet, Segformer, DPT) for all dense output tasks (semantic seg, pixelwise regression, change detection). In research papers I've been seeing a trend towards using UPerNet and DPT decoders to evaluate geospatial foundation models (particularly transformer-based ones) ...
diff --git a/tests/conf/inria_dpt.yaml b/tests/conf/inria_dpt.yaml new file mode 100644 index 00000000000..e89c8166955 --- /dev/null +++ b/tests/conf/inria_dpt.yaml @@ -0,0 +1,14 @@ +model: + class_path: PixelwiseRegressionTask + init_args: + model: 'dpt' + backbone: 'vit_base_patch16_224' + in_channels: 3 +...
11
7
3
[{"id": "G0", "claim": "The new decoder cases (upernet, segformer, and dpt) in SemanticSegmentationTask pass classes=1 instead of classes=num_classes, so multiclass segmentation would be configured with a single output class; consider using num_classes for these cases for consistency.", "category": "correctness", "verd...
null
torchgeo__torchgeo__2840
torchgeo/torchgeo
2,840
defect
f7857d021758908c3e9496b00273bf591cfa6862
df5cd5d6ef932313685936bab754e37ea429d7cb
Download Eurosat split file if only image folder exists
Fixes #2753
diff --git a/tests/datasets/test_eurosat.py b/tests/datasets/test_eurosat.py index 282ff581931..bb179a7bd0f 100644 --- a/tests/datasets/test_eurosat.py +++ b/tests/datasets/test_eurosat.py @@ -73,6 +73,38 @@ def test_not_downloaded(self, tmp_path: Path) -> None: with pytest.raises(DatasetNotFoundError, match='...
2
1
1
[{"id": "G0", "claim": "The split file is not downloaded when the zip file exists but has not been extracted, and _verify should be reorganized to check the split file first (which may require changing or removing _download/_extract/_check_integrity).", "category": "correctness", "verdict": "supported", "priority": "P1...
null
torchgeo__torchgeo__2883
torchgeo/torchgeo
2,883
defect
8ee07fe013f3bb8386543264895b1a025e35bf4e
f35c0a2a9222094973a7fc8767202d8870e9203a
SatSure core-dino Model
This PR adds the YOLO pretrained weights for SatSure's [core-dino](https://huggingface.co/gajeshladhar/core-dino) model. This model is a YOLO11x encoder-only pretrained using DINO on the [core-five](https://huggingface.co/datasets/gajeshladhar/core-five) dataset. Note: I added an option to the `torchgeo.models.yolo`...
diff --git a/docs/api/weights/agnostic.csv b/docs/api/weights/agnostic.csv index 7e419f7c496..ef6116bd7a0 100644 --- a/docs/api/weights/agnostic.csv +++ b/docs/api/weights/agnostic.csv @@ -9,3 +9,4 @@ ResNet50_Weights.FMOW_RGB_GASSL,`link <https://github.com/sustainlab-group/geogr ScaleMAE_ViTLarge16_Weights.FMOW_RGB_...
3
1
0
[{"id": "G0", "claim": "test_different_task invokes yolo(weights, task='obb') with no assertion; add one (e.g. on the instantiated model's args.task) to verify that the custom task actually overrides the pretrained default.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id"...
null
torchgeo__torchgeo__2893
torchgeo/torchgeo
2,893
defect
bc9453efbcf29d74e6a85719b85e008f862ff26b
254ee645a21b024f26fd3de22bc47b1f43cc71bb
Transforms Refactor
This PR has 2 goals: 1) Refactor all model inference transforms that operate on images in `torchgeo.models` to use `torchvision.transforms.v2` instead of `kornia.augmentations` primarily because kornia augmentations can't be `torch.exported`. Torchvision.transforms.v2 CAN be exported because they are simply `nn.Modu...
diff --git a/tests/models/test_dofa.py b/tests/models/test_dofa.py index a2ed5cab907..59f622bcd27 100644 --- a/tests/models/test_dofa.py +++ b/tests/models/test_dofa.py @@ -107,6 +107,14 @@ def test_transforms(self, weights: WeightsEnum) -> None: } weights.transforms(sample) + def test_export_tra...
6
2
0
[{"id": "G0", "claim": "The kornia-based _Extract_Patches transform in torchgeo/transforms/transforms.py may need a corresponding torchvision replacement for the migration to be complete.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The pull request ...
null
torchgeo__torchgeo__2898
torchgeo/torchgeo
2,898
defect
1f3fc5d95bcdccc938e5f34043432071ea7759a5
abcf9c3319c9b822e40b806a6a880b87c1113d2d
Add ConvLSTM model
Add ConvLSTM model for satellite image time series processing: https://arxiv.org/pdf/1506.04214
diff --git a/docs/api/models.rst b/docs/api/models.rst index 1bfbaaaba52..98534840e33 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -10,6 +10,11 @@ Change Star .. autoclass:: ChangeStarFarSeg .. autoclass:: ChangeMixin +ConvLSTM +^^^^^^^^ + +.. autoclass:: ConvLSTM + Copernicus-FM ^^^^^^^^^^^^^ ...
9
9
3
[{"id": "G0", "claim": "The numbered list in the forward docstring's Returns section is formatted in a way Sphinx does not like, and the formatting should be adjusted (e.g. a blank line before the list, different indentation, or a simpler form).", "category": "documentation", "verdict": "supported", "priority": "P2", "...
null
torchgeo__torchgeo__2926
torchgeo/torchgeo
2,926
defect
6dd0b3a9e871a1198d92753380f7888e3f1ac765
048e0dbe2a10ed2870e290352e57b7d096f8a2b7
Add Be The Change (BTC) change detection model
This PR adds the BTC model as discussed in #2918 . The BTC class was verified on OSCD dataset inside my own framework (which handles dataloading and loss). It closely matches the performance of the original implementation. The final modifications (including dice loss to trainer) and full verification within the torc...
diff --git a/tests/models/test_btc.py b/tests/models/test_btc.py new file mode 100644 index 00000000000..b57abf888c4 --- /dev/null +++ b/tests/models/test_btc.py @@ -0,0 +1,19 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import pytest +import torch + +from torchg...
18
16
7
[{"id": "G0", "claim": "The 'model' metadata for CITYSCAPES_SEMSEG_SMALL should read 'SwinTransformer Small' instead of 'SwinTransformer Tiny'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'model' metadata for CITYSCAPES_SEMSEG_BASE should r...
null
torchgeo__torchgeo__2929
torchgeo/torchgeo
2,929
defect
13662a56b202528e3e9dec5ed5d1dfb66c863df5
30fcfbbca477ec2c3f30bba4bd4e8f88a88e8c18
Presto
This PR adds the Presto pixelwise geospatial foundation model from ["Lightweight, Pre-trained Transformers for Remote Sensing Timeseries"](https://arxiv.org/abs/2304.14065) -- MIT licensed Mostly modified from https://github.com/nasaharvest/presto/blob/main/single_file_presto.py. Note that the original presto implem...
diff --git a/torchgeo/models/__init__.py b/torchgeo/models/__init__.py index f4b95dfb38f..c0092e65ab7 100644 --- a/torchgeo/models/__init__.py +++ b/torchgeo/models/__init__.py @@ -22,6 +22,7 @@ from .fcsiam import FCSiamConc, FCSiamDiff from .ltae import LTAE from .panopticon import Panopticon, Panopticon_Weights, ...
20
16
7
[{"id": "G0", "claim": "The new presto.py must preserve the upstream copyright notice '# Copyright (c) 2024 Presto Authors', which the copied header omits.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "tests/models/test_api.py also needs to be up...
null
torchgeo__torchgeo__2986
torchgeo/torchgeo
2,986
defect
5c38802e00c998219ac48b8695bf7a662c7155b6
02d3a9e4e3d611dd6610c761723c56af2f714bf1
CI: test that pyproject.toml and min-reqs.old match
Removes a manual step from the release process and ensures that bugs like the one fixed by #2969 don't happen again. A bit fragile because `Requirement` can't handle comments in `min-reqs.old` and `Specifier[Set]` has no easy way to extract the minimum version, but seems to work so far. Adds a new test-only dep ...
diff --git a/pyproject.toml b/pyproject.toml index 885e9ce7e7a..a37f9efbc74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,6 +136,8 @@ style = [ tests = [ # nbmake 1.3.3+ required for variable mocking "nbmake>=1.3.3", + # packaging 20.9+ required by huggingface-hub + "packaging>=20.9", #...
2
1
1
[{"id": "G0", "claim": "The string replacement approach used to extract versions from specifiers is fragile and incorrect and will fail for version specifiers like `!=1.0`, `<2.0`, or `~=1.0`; use `spec.version` to extract the version from the specifier object instead.", "category": "correctness", "verdict": "opposed",...
null
torchgeo__torchgeo__3119
torchgeo/torchgeo
3,119
defect
53410129798b59ec360beae952bb5cbbac9d5467
7477d9ead296a6829b57a5af69d7535ae385d4f9
fix: IDTReeS geo to pixel boxes conversion bug fix
This fixes a bug where all boxes were being filtered out because they were out of bounds due to not being converted to pixel coordinates correctly. Tested on the actual dataset locally Fixes #3115
diff --git a/torchgeo/datasets/idtrees.py b/torchgeo/datasets/idtrees.py index f025e52c51f..5e6f21a076d 100644 --- a/torchgeo/datasets/idtrees.py +++ b/torchgeo/datasets/idtrees.py @@ -309,9 +309,13 @@ def _load_boxes(self, path: Path) -> Tensor: with rasterio.open(path) as f: for geom in geoms: ...
1
1
0
[{"id": "G0", "claim": "The tests should be modified to assert that N number of bounding boxes are returned from the test data by checking the dimensions of the sample value.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
torchgeo__torchgeo__3139
torchgeo/torchgeo
3,139
defect
ad3b264876d29ebfd689f84b48c63f4b525b3977
b7538ad1e9667a0c55dce947cd4862878ae6c19b
Point datasets: return keypoints
'bounds' should be reserved for the bounding box of the query, and is needed for stitching together predictions. 'keypoints' is more appropriate for point-based data, following [Kornia's naming scheme](https://github.com/kornia/kornia/blob/v0.8.2/kornia/constants.py#L149).
diff --git a/pyproject.toml b/pyproject.toml index 09c7c46a207..1fa417f6f71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,8 @@ classifiers = [ dependencies = [ # einops 0.3+ required for einops.repeat "einops>=0.3", - # geopandas 0.12.1+ required for Shapely 2+ support - "geopandas>=0.1...
2
1
0
[{"id": "G0", "claim": "Questions whether the plot methods should keep showing timestamps (date-based coloring) instead of dropping them.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The keypoints tensor is created without specifying a dtype, which could...
null
torchgeo__torchgeo__3243
torchgeo/torchgeo
3,243
defect
4b7de7a6da8735edcfe1ac8a58fd2629181e8f2b
e7014bd1d132e8fbaacc839b40b3778278720837
feat: Tessera models
## Summary Adds the Tessera pixel time series foundation model to torchgeo, ported from [pixelverse](https://github.com/developmentseed/pixelverse/blob/main/src/pixelverse/models/tessera.py). ## Changes - **New model**: `torchgeo/models/tessera.py` - `Tessera`: Combined S1+S2 encoder with 128-dim output emb...
diff --git a/docs/api/models.rst b/docs/api/models.rst index 0cd73cc6ec6..e95eee7e128 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -29,6 +29,7 @@ Model Architectures models/resnet models/scale-mae models/swin-transformer + models/tessera models/u-net models/vision-transformer di...
4
2
2
[{"id": "G0", "claim": "The reference implementation URLs in the module and Tessera class docstrings should be made consistent with the PR description's stated source (developmentseed/pixelverse).", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
torchgeo__torchgeo__3265
torchgeo/torchgeo
3,265
defect
4b5c9f3d46fd1140dc9827806779d282b337b1dd
989e89f1adb657dc6fdf154b57b0ec96249c301e
ADD PASTIS100
Closes https://github.com/torchgeo/torchgeo/issues/3258
diff --git a/tests/datamodules/test_pastis.py b/tests/datamodules/test_pastis.py new file mode 100644 index 00000000000..3b7f73a62d6 --- /dev/null +++ b/tests/datamodules/test_pastis.py @@ -0,0 +1,52 @@ +# Copyright (c) TorchGeo Contributors. All rights reserved. +# Licensed under the MIT License. + +import os +import ...
4
3
1
[{"id": "G0", "claim": "The PASTISR100 download URL points to the wrong Hugging Face repository and should be https://huggingface.co/datasets/torchgeo/PASTIS-R-100/resolve/7288f86b79e87da71d4789bebce05c4f6e242b8b/PASTIS-R-100.zip.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc...
null
torchgeo__torchgeo__3338
torchgeo/torchgeo
3,338
defect
32267dce9dc2e5784ac3bc362f420c13f7abff00
5a474f79a0d00700de529ca802f3968ea0941dbe
download_url: replace torchvision utility
Drop-in replacement for torchvision's utility with support for os.PathLike and secure hashing algorithms. Doesn't yet support Google Drive or redirection. Hoping to get a minimal working solution first and expand features in follow-up PRs. Depends on #3302
diff --git a/tests/datasets/test_utils.py b/tests/datasets/test_utils.py index edd5c524ffe..56f5459aac5 100644 --- a/tests/datasets/test_utils.py +++ b/tests/datasets/test_utils.py @@ -22,6 +22,7 @@ check_integrity, concat_samples, disambiguate_timestamp, + download_url, extract_archive, laz...
5
2
1
[{"id": "G0", "claim": "At the moment this PR will break downloads for ETCI 2021, FAIR1M, GID15 and LEVIRCD until legal advice on redistribution is obtained.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The PR could also use torch.hub.download_url...
null
torchgeo__torchgeo__3371
torchgeo/torchgeo
3,371
defect
6f89d7b406a2545a691dc9a25ab87e16fefa5ec8
47ae4ba83326bec11930750984a5ed6c5f0e59bd
Seasonet: add time series support
SCxHxW -> TxCxHxW Sample plots <img width="3026" height="645" alt="seasonet_multi" src="https://github.com/user-attachments/assets/c53917c1-d6cc-4f75-977a-a25e22af0bfe" /> <img width="1513" height="648" alt="seasonet_single1" src="https://github.com/user-attachments/assets/5ed676ea-5fd5-41d1-9839-dede5a406503" /...
diff --git a/tests/datasets/test_seasonet.py b/tests/datasets/test_seasonet.py index 77a5d7b0ad3..bc2faa4627f 100644 --- a/tests/datasets/test_seasonet.py +++ b/tests/datasets/test_seasonet.py @@ -84,7 +84,7 @@ def test_getitem(self, dataset: SeasoNet) -> None: assert isinstance(x, dict) assert isinst...
1
1
0
[{"id": "G0", "claim": "Include a new sample plot in the PR description so the updated plot output can be visually checked.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
torchmd__torchmd-net__115
torchmd/torchmd-net
115
defect
95329e409c6871dea5f7db00c932c6b6d210cca4
5cd138cfdd8d35a579bab4c7d2a0939cb10a6963
Refactor the additional argument passing to dataset classes
This cleans up the logic of passing extra datasets arguments to dataset classes.
diff --git a/examples/ET-MD17.yaml b/examples/ET-MD17.yaml index e6b10a09b..9b5e4708b 100644 --- a/examples/ET-MD17.yaml +++ b/examples/ET-MD17.yaml @@ -7,7 +7,8 @@ coord_files: null cutoff_lower: 0.0 cutoff_upper: 5.0 dataset: MD17 -dataset_arg: aspirin +dataset_arg: + molecules: aspirin dataset_root: ~/data der...
3
3
3
[{"id": "G0", "claim": "The dataset argument checks (MD17's molecules and QM9's label) should validate values against the known options instead of only checking that the argument is not None.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "MD17 should che...
null
torchmd__torchmd-net__134
torchmd/torchmd-net
134
defect
a80e3787b7f6bee32e728187fd6b5866359e8577
c63a1a39c3f65705cdd6e6bd1592abfc32ca4757
Implement ZBL potential
This is the first piece of #26. It isn't fully tested yet, but I think it's ready for a first round of comments. I created a mechanism for passing arguments to the prior. `prior_args` is now the option specified by the user in the config file. `prior_init_args` stores the value returned by `get_init_args()`, whic...
diff --git a/tests/test_module.py b/tests/test_module.py index 17002d7c8..c920c010e 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -43,7 +43,7 @@ def test_train(model_name, use_atomref, tmpdir): prior = None if use_atomref: prior = getattr(priors, args["prior_model"])(dataset=datamod...
9
6
3
[{"id": "G0", "claim": "The pull request's tests fail with RuntimeError: 'NoneType' object has no attribute 'atomwise' at the prior-model call in torchmdnet/models/model.py.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The prior model should follo...
null
torchmd__torchmd-net__143
torchmd/torchmd-net
143
defect
da617ea0b79fd2d2fbc3338fe439127453b7487f
60844566c282d04cf1504eb2f3aeb07a5ebd325c
Prior: D2 dispersive correction
- [x] Implement the D2 dispersive correction - [x] Tests - [x] Documentation
diff --git a/tests/test_prior_d2.py b/tests/test_prior_d2.py new file mode 100644 index 000000000..d08214b67 --- /dev/null +++ b/tests/test_prior_d2.py @@ -0,0 +1,83 @@ +from torchmdnet.priors import D2 +import torch as pt +from pytest import mark + + +def compute_with_psi4(z, pos): + """ + Compute the D2 term wi...
5
5
2
[{"id": "G0", "claim": "Use the same system as in #134, where the dataset provides `atomic_number`, `distance_scale`, and `energy_scale` fields, so the prior can be used with arbitrary units and with datasets whose atom types differ from atomic numbers.", "category": "design", "verdict": "supported", "priority": "P1", ...
null
torchmd__torchmd-net__156
torchmd/torchmd-net
156
defect
0a3534fb28379b4c72b6e8e5981ba44e3d24712f
c536a2e535b010d45a569a3287067da8e6597c5b
Don't store tensors in init args
On some computers (but not others) this leads to an error when resuming training, due to tensors stored in `hparams.yaml`. I'm not sure why it only happens on some computers.
diff --git a/tests/priors.yaml b/tests/priors.yaml index 4ec754cac..1b49d97b0 100644 --- a/tests/priors.yaml +++ b/tests/priors.yaml @@ -41,6 +41,9 @@ prior_model: - ZBL: cutoff_distance: 4.0 max_num_neighbors: 50 + - D2: + cutoff_distance: 10.0 + max_num_neighbors: 100 - Atomref rbf_typ...
2
1
1
[{"id": "G0", "claim": "get_init_args() should use tensor.tolist() and tensor.item() instead of the .numpy() list comprehension and float(), which are unsafe when tensors are on different devices.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "There...
null
torchmd__torchmd-net__159
torchmd/torchmd-net
159
defect
9ab6280714aa2d833358cac67093534e9b4d236c
c1ae1f901b1ba25fc6d287cc95680aa2de0b50f4
Created Coulomb prior
This adds a Coulomb interaction. At the moment it requires partial charges to be specified by the dataset. In the future we'll want to let the model predict charges, but that will come later. The interaction is applied to all pairs without any cutoff. The point of this prior is to provide accurate long range inte...
diff --git a/tests/test_priors.py b/tests/test_priors.py index 493bd613f..e2eda4bf3 100644 --- a/tests/test_priors.py +++ b/tests/test_priors.py @@ -5,7 +5,7 @@ from torchmdnet import models from torchmdnet.models.model import create_model, create_prior_models from torchmdnet.module import LNNP -from torchmdnet.prio...
3
1
1
[{"id": "G0", "claim": "The Distance module is constructed with a hardcoded max_num_neighbors of 100 instead of using the max_num_neighbors parameter passed to the prior.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Distance should be constructed ...
null
torchmd__torchmd-net__179
torchmd/torchmd-net
179
defect
e20876ff79fe952db25e5fc55cc051a919ef218f
5970fc07b0978b3f352242eaa65626de2450fda9
Fix neighbor backward
Trying to integrate OptimizedDistance into the equivariant transformer (ET) I realized my module did not supported double backwards (DB), which is required in ET when training with forces. This PR adds support for double gradient to OptimizedDistance, and adds some tests for it using [torch.autograd.gradgradcheck](h...
diff --git a/tests/test_neighbors.py b/tests/test_neighbors.py index 848489a46..f4bd741b8 100644 --- a/tests/test_neighbors.py +++ b/tests/test_neighbors.py @@ -138,13 +138,168 @@ def test_neighbors( assert np.allclose(distances, ref_distances) assert np.allclose(distance_vecs, ref_distance_vecs) +@pytest.m...
3
3
0
[{"id": "G0", "claim": "The `strategy` lambda parameter should be declared `const std::string` (with peastman refining it to `const std::string&`) instead of a mutable copy.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The inner `num_threads`/...
null
torchmd__torchmd-net__182
torchmd/torchmd-net
182
defect
e20876ff79fe952db25e5fc55cc051a919ef218f
90543de690b6b14721253c4fe82909a9919f3ac3
Support for float64
I added a new parameter, dtype, to control whether TorchMD_Net uses float or double. The value can be passed along the rest to create_model, but it defaults to float if not present. Can be either a string or a torch.dtype. I also added some comments here and there. To showcase I added a test that checks the corr...
diff --git a/examples/ET-QM9.yaml b/examples/ET-QM9.yaml index ef9048578..24d4ba242 100644 --- a/examples/ET-QM9.yaml +++ b/examples/ET-QM9.yaml @@ -55,3 +55,4 @@ train_size: 110000 trainable_rbf: false val_size: 10000 weight_decay: 0.0 +dtype: float diff --git a/tests/test_model.py b/tests/test_model.py index cdf40...
2
2
1
[{"id": "G0", "claim": "The default dtype string in create_model and the --dtype argparse default should be \"float32\" rather than \"float\" to avoid ambiguity.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The C_6_R_r tensor created in torchm...
null
torchmd__torchmd-net__195
torchmd/torchmd-net
195
defect
4645fa45143503ff164d9d4970e110d41937a9c2
b9672091681983d90b2245ecd1445f9d8e04b30c
Make TensorNet CUDA-graph compatible
This PR is an effort to optimize TensorNet. Note that I merged here also all the changes in #186. I have focused on inference of small molecules (such as Alanine, 22 atoms), in which we saw the CUDA kernel launching overhead was tremendous: ![image](https://github.com/torchmd/torchmd-net/assets/13015792/b818685e-8...
diff --git a/benchmarks/inference.py b/benchmarks/inference.py new file mode 100644 index 000000000..f6508bc34 --- /dev/null +++ b/benchmarks/inference.py @@ -0,0 +1,167 @@ +""" +Benchmark script for inference. +This script compiles a model using torch.compile and measures the time it takes to run a forward and backwar...
2
1
1
[{"id": "G0", "claim": "raimis believes the edge_vec normalization uses torch.masked_scatter with wrong semantics (scattering edge_weight into a tensor of ones does not yield the intended per-edge weights) and proposes instead dividing by edge_weight.masked_fill(self_edge_mask, 1).", "category": "correctness", "verdict...
null
torchmd__torchmd-net__208
torchmd/torchmd-net
208
defect
4645fa45143503ff164d9d4970e110d41937a9c2
c155f189b40f6f47a2dda1f80bbea109b4d5d694
Remove dtype parameter, use previously existing "precision" instead
The dtype parameter was causing some issues (see #205). I realized that there is already a "pecision" parameter that can be used for the same thing. This PR removes the dtype argument and uses precision instead, which can be 16, 32 or 64. @AntonioMirarchi could you check that the issues you were seeing are gone wi...
diff --git a/examples/ET-QM9.yaml b/examples/ET-QM9.yaml index 24d4ba242..08b27a410 100644 --- a/examples/ET-QM9.yaml +++ b/examples/ET-QM9.yaml @@ -55,4 +55,4 @@ train_size: 110000 trainable_rbf: false val_size: 10000 weight_decay: 0.0 -dtype: float +precision: 32 diff --git a/tests/test_model.py b/tests/test_model...
1
1
0
[{"id": "G0", "claim": "create_model should stop assigning the derived dtype into args (args[\"dtype\"] should be removed, since dtype was removed from the argparser in train.py) and the uses including shared_args should be checked accordingly.", "category": "maintainability", "verdict": "supported", "priority": "P2", ...
null
torchmd__torchmd-net__210
torchmd/torchmd-net
210
defect
dca66796d00680a79a7b7c85d6704d30d15dc84c
82e15352aead6647d7894a04c72257104be80e10
Updating to Lightning 2.0
This is an effort to update the pytorch lightning dependency (see #168 ) A lot has changed since the LNNP module was written (current version is 1.6.4) and I expect this update would increase compatibility with some functionalities we seek (AKA torch compile/torchscript training).
diff --git a/environment.yml b/environment.yml index aeac149e3..a5c0097b4 100644 --- a/environment.yml +++ b/environment.yml @@ -11,7 +11,8 @@ dependencies: - pytorch_geometric==2.3.1 - pytorch_scatter==2.1.1 - pytorch_sparse==0.6.17 - - pytorch-lightning==1.6.3 + - lightning==2.0.4 + - pydantic<2 - torc...
10
8
2
[{"id": "G0", "claim": "train.py lost checkpoint-resume support because Trainer(resume_from_checkpoint=) no longer exists in Lightning 2.0, and it should be replaced, e.g. by passing ckpt_path to trainer.fit.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl...
null
torchmd__torchmd-net__214
torchmd/torchmd-net
214
defect
e964a72b3d0b71d993b5abb1e10a6ffdf072f52d
54fb047af21b93a358f5336303f72c6ddcb17c92
Make OutputModel aware of CUDA graph capturing.
The reduction in OutputModel requires knowing the number of batches (computed as batch.max()+1) to be able to produce a tensor with a per-batch property (a.i. the total energy). This operation is inherently blocking and thus cannot be called during CUDA graph capture. One way to go around this limitation is to ma...
diff --git a/tests/test_model.py b/tests/test_model.py index 88ea54d49..f1c7f24e9 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -82,6 +82,22 @@ def test_torchscript_dynamic_shapes(model_name, device): grad_outputs=grad_outputs, )[0] +@mark.parametrize("model_name", ["tensornet"])...
5
4
2
[{"id": "G0", "claim": "Calling the built-in torch.cuda.graphs.is_current_stream_capturing() from the scripted OutputModel fails because that builtin is not supported in Torchscript.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "During CUDA graph c...
null
torchmd__torchmd-net__235
torchmd/torchmd-net
235
defect
f837503b9daedaf5c1870d0198ae6c0ae69a67a2
ab30bbbab6b06deb71d4393c4850b81cee473612
Preload small datasets to memory in Custom dataset
While replicating results from the [torchmd-protein-thermodynamics repository](https://github.com/torchmd/torchmd-protein-thermodynamics), I experienced sluggish training speeds and low GPU usage (meaning sitting at 0% and briefly going to 100% at each iteration) using the following configuration file: ```yaml activa...
diff --git a/tests/test_datasets.py b/tests/test_datasets.py index b8c7ce960..83e0aad23 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -1,4 +1,5 @@ import pytest +import os.path from pytest import mark, raises from os.path import join import numpy as np @@ -7,26 +8,41 @@ import h5py -@mark...
10
7
1
[{"id": "G0", "claim": "The Custom dataset class is incredibly inefficient because it reloads the whole file every time get() is called; intelligent caching would help, and a much better choice is to use the HDF5 dataset class, possibly by having Custom create a temporary HDF5 file on startup and load from it.", "categ...
null
torchmd__torchmd-net__279
torchmd/torchmd-net
279
defect
c0edfedfcdb841f0b52d571f3f788339ef5ff486
3c15608b8cc8ef365fb43802f8d02b2101e35807
Training with relative energies, infering with total energy.
Following #276 this PR aims at providing better support for training with relative energies while having the possibility of producing total enegies during inference. This requires the following: - [x] Make the Datasets provide atomic reference energies (already there via get_atomref) - [x] Provide a mechanism to *...
diff --git a/docs/source/datasets.rst b/docs/source/datasets.rst index 86fa22eee..dd71e0367 100644 --- a/docs/source/datasets.rst +++ b/docs/source/datasets.rst @@ -64,13 +64,42 @@ If you want to train on custom data, first have a look at :py:mod:`torchmdnet.da To add a new dataset, you need to: -1. Write a new cl...
4
1
1
[{"id": "G0", "claim": "The new 'Datasets and Atomref' documentation should state that the reference energies returned by get_atomref are expected to be in Hartree.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The identical get_atomref implement...
null
torchmd__torchmd-net__308
torchmd/torchmd-net
308
defect
fae79bd9e8e96ab235c52d5e54e33c3be9e4d05d
a5c0a3a842f0a27ef133c7051718523266de633d
Added support for ensemble models
Works fine but I don't like so much that the same function can return a model with 4 outputs (energy/force mean/std) or with 2 outputs (just energy, force) depending on if you pass a single file or multiple. Maybe it could become an argument to load_model to disable the returning of the std?
diff --git a/torchmdnet/models/model.py b/torchmdnet/models/model.py index a2a80f901..c30d894ff 100644 --- a/torchmdnet/models/model.py +++ b/torchmdnet/models/model.py @@ -151,6 +151,10 @@ def load_model(filepath, args=None, device="cpu", **kwargs): Returns: nn.Module: An instance of the TorchMD_Net mode...
3
2
0
[{"id": "G0", "claim": "The Ensemble could return a structured container (a dict such as {\"y\": {\"mean\": ..., \"std\": ...}, \"neg_dy\": {...}} or nested tuples) storing mean and std for each output instead of the flat 4-tuple, which would also open the way to interface compatibility with TorchMD_Net.", "category": ...
null
torchmd__torchmd-net__83
torchmd/torchmd-net
83
defect
dce603243e306eb726057cc0e7f9e19632f17a0a
f60e3ba7612c12f173f676978f4e4a776fa82c64
COMP6 dataset
- [x] COMP6 - [x] ANI-MD - [x] DrugBank - [x] GDB9to11 - [x] GDB11to13 - [x] Tripeptides - [x] s66x8 - [x] Documentation - [x] Test
diff --git a/tests/test_dataset_comp6.py b/tests/test_dataset_comp6.py new file mode 100644 index 000000000..48b4ea077 --- /dev/null +++ b/tests/test_dataset_comp6.py @@ -0,0 +1,47 @@ +import torch as pt +from tempfile import TemporaryDirectory +from torch_geometric.loader import DataLoader +from torchmdnet.datasets im...
2
2
1
[{"id": "G0", "claim": "The COMP6 dataset classes imported in torchmdnet/datasets/__init__.py are not included in `__all__`, so they will not be displayed as dataset options when running `train.py --help`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim...
null
tornadoweb__tornado__2058
tornadoweb/tornado
2,058
defect
a73bfc9ddd7515489508f194759e71b92e3b7ff7
fee88b665968882a36c48afe4de32d3a48d9060c
Return HTTP 400 on bad request lines
This closes #1082 by returning a HTTP 400 (and then closing the connection) when the server encounters a bad request line instead of closing the connection immediatley.
diff --git a/tornado/http1connection.py b/tornado/http1connection.py old mode 100644 new mode 100755 index 53744ece3..b0cfa9c61 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -248,6 +248,12 @@ def _read_message(self, delegate): self.close() if self.stream is None: ...
4
2
1
[{"id": "G0", "claim": "Most or all uses of HTTPInputError should result in an HTTP 400 response, so the new HTTPBadRequestInputError subclass is unnecessary — the reviewer asks to just use HTTPInputError and send the 400 response `if not self.is_client`.", "category": "design", "verdict": "supported", "priority": "P1"...
null
tornadoweb__tornado__2081
tornadoweb/tornado
2,081
defect
62e47215ce12aee83f951758c96775a43e80475b
7f1a58f9faacb0bb0e95c2527a348195742eb866
Fix module autoreload for __main__ with relative imports
The fix works for Python >= 3.4, keeping the current workaround for previous versions. Also introduce a first unit test for autoreload. Close #2044.
diff --git a/tornado/autoreload.py b/tornado/autoreload.py index 24deb79d88..ad6cec3660 100644 --- a/tornado/autoreload.py +++ b/tornado/autoreload.py @@ -63,12 +63,11 @@ # file.py gets added to the path, which can cause confusion as imports # may become relative in spite of the future import. # -# We address the fo...
2
2
0
[{"id": "G0", "claim": "Keep the `import tornado.autoreload` line in tornado/test/import_test.py even though there is a new unittest for the module.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Assign a local variable argv in both branches of the __sp...
null
tornadoweb__tornado__2162
tornadoweb/tornado
2,162
defect
37081d792896a44d27c3423b73001937d972c806
8d96557923ddcb8801fe12e506fac67342f43d6f
handle multiple values in X-Forwarded-Proto
use the first entry, which should be the outermost value closes #2161
diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 8921a051fe..e2b1d34a6f 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -287,6 +287,9 @@ def _apply_xheaders(self, headers): proto_header = headers.get( "X-Scheme", headers.get("X-Forwarded-Proto", ...
1
1
1
[{"id": "G0", "claim": "The outermost X-Forwarded-Proto entry is probably not what we want, since it is the least reliable; the code should either use the innermost entry or skip the same number of entries that trusted_downstream skips in the X-Forwarded-For list.", "category": "design", "verdict": "supported", "priori...
null
tornadoweb__tornado__2727
tornadoweb/tornado
2,727
defect
ff985fe509513325462441e017f1ec31dda737c1
4e7c7b6024da07709673e7966f394ffcc50e5243
Clear fewer headers on 1xx/204/304 responses
This function is called on more than just 304 responses; it’s important to permit the Allow header on 204 responses. Also, the relevant RFCs have changed significantly. Fixes #2726.
diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py index d1cc14673b..11a4ee0229 100644 --- a/tornado/test/httpclient_test.py +++ b/tornado/test/httpclient_test.py @@ -109,7 +109,7 @@ def get(self): self.set_status(304) self.set_header("Content-Length", 42) - def _clear...
3
3
0
[{"id": "G0", "claim": "The method should be renamed from _clear_headers_for_304 to _clear_representation_headers, changed to clear only Content-Type, Content-Language, and Content-Encoding (permitting Allow and Last-Modified), and kept called for all 1xx, 204, and 304 responses.", "category": "design", "verdict": "sup...
null
tornadoweb__tornado__3376
tornadoweb/tornado
3,376
defect
f399f40fde0ae1b130646db783a6f79cc59231b2
866acfce4767c039d7c8bd9e91f4e498c162ea8f
websockets: fix ping_timeout
Closes #3258 Closes #2905 Closes #2655 Fixes an issue with the calculation of ping timeout interval which caused connections to be erroneously closed from the server end. This could happen shortly after the connection was opened, *before* the ping was even sent (as reported in #3258) as the result of startup logic...
diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py index 4d39f37046..f279d0706e 100644 --- a/tornado/test/websocket_test.py +++ b/tornado/test/websocket_test.py @@ -806,7 +806,11 @@ class PingHandler(TestWebSocketHandler): def on_pong(self, data): self.write_messa...
5
4
2
[{"id": "G0", "claim": "periodic_ping unconditionally sleeps for ping_timeout, so when ping_timeout is greater than ping_interval (which is the default) the next ping is not sent until the old timeout sleep has passed; the logic should be restructured (e.g. send pings and handle timeouts from a single coroutine without...
null
tornadoweb__tornado__3405
tornadoweb/tornado
3,405
defect
bdfc017c66817359158185561cee7878680cd841
e169be78f81fd43bce86dfcd4247032f80e425c9
Add support for binding Unix sockets in Linux's abstract namespace.
Linux offers an "abstract namespace" for Unix sockets, distinguished by the address comprising an initial null byte. Specifying a `file` argument describing an abstract namespace address to `netutil.bind_unix_socket(…)` fails as a consequence of the additional, file-system orientated, processing performed: https://git...
diff --git a/tornado/netutil.py b/tornado/netutil.py index e83afad570..b0cf21c5a3 100644 --- a/tornado/netutil.py +++ b/tornado/netutil.py @@ -209,17 +209,20 @@ def bind_unix_socket( # Hurd doesn't support SO_REUSEADDR raise sock.setblocking(False) - try: - s...
4
4
3
[{"id": "G0", "claim": "The new `file.startswith(\"\\0\")` branch in bind_unix_socket should carry a comment explaining that a leading NUL byte selects Linux's abstract namespace, and bdarnell was inclined against adding a platform check that would make leading-NUL use an error on other platforms.", "category": "docume...
null
tornadoweb__tornado__3451
tornadoweb/tornado
3,451
defect
0a39ba8b6ac0beb48a3244098cfa72ce1f59f215
f9322d69e8f684f7ffc203c425c52fdde7d00867
Allow horizontal tabs in header values
Addresses https://github.com/tornadoweb/tornado/issues/3450
diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index a829657abe..5e73254449 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -700,11 +700,12 @@ def get(self): self.set_header("X-Foo", "foo\r\nX-Bar: baz") raise Exception("Didn't get expected exception")...
4
3
1
[{"id": "G0", "claim": "The regex should also treat \\x7f (DEL) as an invalid header character, since the RFCs forbid it too.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "For a slightly larger change, the regex could be inverted to define the vali...
null