-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.1.0 release #226
0.1.0 release #226
Changes from 15 commits
ab41d56
363df27
d510400
0c4e6b5
aa8b6b2
4e708a5
1a9de99
e22cf22
f436f04
e9b8dee
0f0687d
ad0439d
046f69a
8cc4d5e
49705cc
8ce9b60
5fae8c0
3c26048
43924f2
b222b5b
cb90dfc
8d7f02a
ea219cc
2b4f60d
8a990c7
881dc9b
162b6bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
Installation | ||
============ | ||
|
||
TorchGeo is simple and easy to install. We support installation using the `pip <https://pip.pypa.io/>`_, `conda <https://docs.conda.io/>`_, and `spack <https://spack.io/>`_ package managers, although you can also install from source if you want to. | ||
TorchGeo is simple and easy to install. We support installation using the `pip <https://pip.pypa.io/>`_, `conda <https://docs.conda.io/>`_, and `spack <https://spack.io/>`_ package managers. | ||
|
||
pip | ||
--- | ||
|
||
.. | ||
Since TorchGeo is written in pure-Python, the easiest way to install it is using pip: | ||
Since TorchGeo is written in pure-Python, the easiest way to install it is using pip: | ||
|
||
.. code-block:: console | ||
.. code-block:: console | ||
|
||
$ pip install torchgeo | ||
$ pip install torchgeo | ||
|
||
|
||
If you want to install a development version, you can use a VCS project URL: | ||
|
@@ -32,16 +31,10 @@ or a local git checkout: | |
|
||
By default, only required dependencies are installed. TorchGeo has a number of optional dependencies for specific datasets or development. These can be installed with a comma-separated list: | ||
|
||
.. | ||
.. code-block:: console | ||
|
||
$ pip install torchgeo[datasets] | ||
$ pip install torchgeo[style,tests] | ||
|
||
.. code-block:: console | ||
|
||
$ pip install .[datasets] | ||
$ pip install .[style,tests] | ||
$ pip install torchgeo[datasets] | ||
$ pip install torchgeo[style,tests] | ||
|
||
|
||
See the ``setup.cfg`` for a complete list of options. See the `pip documentation <https://pip.pypa.io/>`_ for more details. | ||
|
@@ -57,12 +50,11 @@ If you need to install non-Python dependencies like PyTorch, it's better to use | |
$ conda config --set channel_priority strict | ||
|
||
|
||
.. | ||
Now, you can install the latest stable release using: | ||
Now, you can install the latest stable release using: | ||
|
||
.. code-block:: console | ||
.. code-block:: console | ||
|
||
$ conda install torchgeo | ||
$ conda install torchgeo | ||
|
||
|
||
Conda does not directly support installing development versions, but you can use conda to install our dependencies, then use pip to install TorchGeo itself. | ||
|
@@ -110,15 +102,3 @@ Optional dependencies can be installed by enabling build variants: | |
Run ``spack info py-torchgeo`` for a complete list of variants. | ||
|
||
See the `spack documentation <https://spack.readthedocs.io/>`_ for more details. | ||
|
||
source | ||
------ | ||
|
||
TorchGeo can also be installed from source using the ``setup.py`` file and setuptools. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct invocation of |
||
|
||
.. code-block:: console | ||
|
||
$ git clone https://github.com/microsoft/torchgeo.git | ||
$ cd torchgeo | ||
$ python setup.py build | ||
$ python setup.py install |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,20 +134,34 @@ def test_config_file(tmp_path: Path) -> None: | |
subprocess.run(args, check=True) | ||
|
||
|
||
@pytest.mark.parametrize("task", ["cowc_counting", "cyclone", "sen12ms", "landcoverai"]) | ||
@pytest.mark.parametrize( | ||
"task", | ||
[ | ||
"bigearthnet", | ||
"byol", | ||
"chesapeake_cvpr", | ||
"cowc_counting", | ||
"cyclone", | ||
"landcoverai", | ||
"naipchesapeake", | ||
"resisc45", | ||
"sen12ms", | ||
"so2sat", | ||
"ucmerced", | ||
], | ||
) | ||
def test_tasks(task: str, tmp_path: Path) -> None: | ||
output_dir = tmp_path / "output" | ||
data_dir = os.path.join("tests", "data", task) | ||
log_dir = tmp_path / "logs" | ||
args = [ | ||
sys.executable, | ||
"train.py", | ||
"experiment.name=test", | ||
"program.output_dir=" + str(output_dir), | ||
"program.data_dir=" + data_dir, | ||
"program.log_dir=" + str(log_dir), | ||
"trainer.fast_dev_run=1", | ||
"experiment.task=" + task, | ||
"program.overwrite=True", | ||
"config_file=" + os.path.join("conf", "task_defaults", task + ".yaml"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @calebrob6 without this line, the default configs aren't being loaded, so there might be something broken with default loading. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default config is loaded by name here -- https://github.com/microsoft/torchgeo/blob/main/train.py#L97. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but if you comment out this line, you'll see that it isn't loading the default config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It definitely is loading the default config, else it would throw an error about not finding the default config There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of the way configurations are merged,
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I realize I've been abusing the config system by modifying it to suit the tests. What if we:
We could also do 2 real quick, it wouldn't take that long. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make a TODO here or somewhere that we'll remember? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll create an issue so we don't re-trigger the tests |
||
] | ||
subprocess.run(args, check=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@isaaccorley the indices tutorial imports things that aren't TorchGeo deps, does it need to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can revamp them but requiring that notebooks only use torchgeo deps might be too restrictive. E.g we may want to use visualization libraries in a tutorial but not add them as a dependency to torchgeo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code definitely uses these two libraries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's do this for the next release