Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsleh committed Jun 11, 2024
2 parents 282c2be + bead637 commit abc9a9d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 33 deletions.
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ Slack workspace, where conversation about when to hold the community calls in th
place.

**Slack Workspace**: Join
our [DeepSensor Slack channel](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform) for
discussions, queries, and community interactions. Send us an email at [email protected] to
request an invite.
our DeepSensor Slack channel for
discussions, queries, and community interactions. In order to join, [sign up for the Turing Environment & Sustainability stakeholder community](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u). The form includes a question on signing up for the Slack team, where you can find DeepSensor's channel.

**Email**: If you prefer a more formal communication method or have specific concerns, please reach
us at [email protected].
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ This allows DeepSensor users to focus on the science and rapidly iterate on idea

DeepSensor is an experimental package, and we
welcome [contributions from the community](https://github.com/alan-turing-institute/deepsensor/blob/main/CONTRIBUTING.md).
We have an active Slack channel for code and research discussions; you can request to
join [via this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform).
We have an active Slack channel for code and research discussions; you can join by [signing up for the Turing Environment & Sustainability stakeholder community](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u). The form includes a question on signing up for the Slack team, where you can find DeepSensor's channel.

![DeepSensor example application figures](https://raw.githubusercontent.com/alan-turing-institute/deepsensor/main/figs/deepsensor_application_examples.png)

Expand Down
2 changes: 1 addition & 1 deletion deepsensor/active_learning/acquisition_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
context_set_idx (int):
Index of context set to add new observations to when computing
the acquisition function.
target_set_idx (int):
target_set_idx (int):
Index of target set to compute acquisition function for.
"""
self.model = model
Expand Down
2 changes: 1 addition & 1 deletion deepsensor/data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TaskLoader:
- If all data passed as paths, load the data and overwrite the paths with the loaded data
- Either all data is passed as paths, or all data is passed as loaded data (else ``ValueError``)
- If all data passed as paths, the TaskLoader can be saved with the ``save`` method
(using config)
(using config)
Args:
task_loader_ID:
Expand Down
24 changes: 9 additions & 15 deletions deepsensor/data/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def summarise_repr(cls, k, v) -> str:
Value of the task dictionary.
Returns:
str:
String representation of the task.
str: String representation of the task.
"""
if v is None:
return "None"
Expand Down Expand Up @@ -357,14 +356,10 @@ def append_obs_to_task(
option plus ability to remove observations.
Args:
task (:class:`deepsensor.data.task.Task`:):
The task to modify.
X_new (array-like):
New observation coordinates.
Y_new (array-like):
New observation values.
context_set_idx (int):
Index of the context set to append to.
task (:class:`deepsensor.data.task.Task`:): The task to modify.
X_new (array-like): New observation coordinates.
Y_new (array-like): New observation values.
context_set_idx (int): Index of the context set to append to.
Returns:
:class:`deepsensor.data.task.Task`:
Expand Down Expand Up @@ -459,15 +454,14 @@ def concat_tasks(tasks: List[Task], multiple: int = 1) -> Task:
the computational graph in graph mode.
Returns:
:class:`~.data.task.Task`
Task containing multiple batches.
:class:`~.data.task.Task`: Task containing multiple batches.
Raises:
ValueError
ValueError:
If the tasks have different numbers of target sets.
ValueError
ValueError:
If the tasks have different numbers of targets.
ValueError
ValueError:
If the tasks have different types of target sets (gridded/
non-gridded).
"""
Expand Down
13 changes: 9 additions & 4 deletions deepsensor/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def task(

with plt.rc_context(params):
fig, axes = plt.subplots(
nrows=nrows, ncols=ncols, figsize=(ncols * figsize, nrows * figsize)
nrows=nrows,
ncols=ncols,
figsize=(ncols * figsize, nrows * figsize),
)
if nrows == 1:
axes = axes[np.newaxis]
Expand Down Expand Up @@ -303,7 +305,8 @@ def offgrid_context(
colors: Optional[str] = None,
**scatter_kwargs,
) -> None:
"""Plot the off-grid context points on ``axes``.
"""
Plot the off-grid context points on ``axes``.
Uses a provided :class:`~.data.processor.DataProcessor` to unnormalise the
context coordinates if provided.
Expand Down Expand Up @@ -334,7 +337,7 @@ def offgrid_context(
Additional keyword arguments to pass to the scatter plot.
Returns:
None.
None
"""
if markers is None:
# all matplotlib markers
Expand Down Expand Up @@ -1018,7 +1021,9 @@ def prediction(

# rotate date times
ax.set_xticklabels(
ax.get_xticklabels(), rotation=45, horizontalalignment="right"
ax.get_xticklabels(),
rotation=45,
horizontalalignment="right",
)

ax.set_title(f"{var_ID} {param}")
Expand Down
3 changes: 2 additions & 1 deletion docs/community/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Check our [](./contributing.md) guide.
**Q: How can I get in touch with other contributors or maintainers?**

**Answer:**
[Request to join our Slack channel](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform) to stay in touch with other contributors and maintainers.
Request to join our Slack channel to stay in touch with other contributors and maintainers. You can join by [signing up for the Turing Environment & Sustainability stakeholder community](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u). The form includes a question on signing up for the Slack team, where you can find DeepSensor's channel.

We also have a regular community Zoom call (join the Slack channel or get in touch to find out more).

---
Expand Down
3 changes: 1 addition & 2 deletions docs/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

The DeepSensor community is a group of users and contributors who are interested in the development of DeepSensor. The community is open to anyone who is interested in DeepSensor. The community is a place to ask questions, discuss ideas, and share your work.

If you are interested in joining the community, please request to join our Slack channel via [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform).
Once your request has been accepted, you will have access to the Slack channel [here](https://ai4environment.slack.com/archives/C05NQ76L87R).
If you are interested in joining the community, please request to join our Slack channel. You can join by [signing up for the Turing Environment & Sustainability stakeholder community](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u). The form includes a question on signing up for the Slack team, where you can find DeepSensor's channel.

We welcome contributions from the community. If you are interested in contributing to DeepSensor, please read the [Contributing Guide](./contributing.md).
3 changes: 1 addition & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ neural processes.
**Useful links**:
[Code repository](https://github.com/alan-turing-institute/deepsensor) |
[Issues](https://github.com/alan-turing-institute/deepsensor/issues) |
[Slack join request form](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform) |
[Slack join request form](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u) |
[Slack channel](https://ai4environment.slack.com/archives/C05NQ76L87R) |
[DeepSensor Gallery](https://github.com/tom-andersson/deepsensor_gallery)



::::{grid} 1 1 2 2
:gutter: 2

Expand Down
9 changes: 7 additions & 2 deletions docs/research_ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Below are a non-exhaustive selection of research ideas that you could explore.
It would be helpful to ensure you are familiar with the literature and
resources in the [](resources.md) page before starting.

Why not [join our Slack channel](https://docs.google.com/forms/d/e/1FAIpQLScsI8EiXDdSfn1huMp1vj5JAxi9NIeYLljbEUlMceZvwVpugw/viewform)
and start a conversation around these ideas or your own? :-)
Why not join our Slack channel and start a conversation around these ideas or your own? :-) You can join by [signing up for the Turing Environment & Sustainability stakeholder community](https://forms.office.com/pages/responsepage.aspx?id=p_SVQ1XklU-Knx-672OE-ZmEJNLHTHVFkqQ97AaCfn9UMTZKT1IwTVhJRE82UjUzMVE2MThSOU5RMC4u). The form includes a question on signing up for the Slack team, where you can find DeepSensor's channel.

## Transfer learning from regions of dense observations to regions of sparse observations

Since the `ConvNP` is a data-hungry model, it does not perform well if only trained on a
small number of observations, which presents a challenge for modelling variables that
are poorly observed.
Expand All @@ -20,19 +20,22 @@ of sparse observations?
Does the performance improve?

## Sensor placement for forecasting

Previous active learning research with ConvNPs has only considered sensor placement for interpolation.
Do the sensor placements change when the model is trained for forecasting?

See, e.g., Section 4.2.1 of [Environmental sensor placement with convolutional Gaussian neural processes](https://doi.org/10.1017/eds.2023.22).

## U-Net architectural changes

The `ConvNP` currently uses a vanilla U-Net architecture.
Do any architectural changes improve performance, such as batch normalisation or dropout?

This would require digging into the [`neuralprocesses.construct_convgnp` method](https://github.com/wesselb/neuralprocesses/blob/f20572ba480c1279ad5fb66dbb89cbc73a0171c7/neuralprocesses/architectures/convgnp.py#L97)
and replacing the U-Net module with a custom one.

## Extension to continuous time observations

The `ConvNP` currently assumes that the observations are on a regular time grid.
How can we extend this to continuous time observations, where the observations are not necessarily
on a regular time grid?
Expand All @@ -41,6 +44,7 @@ For example, can we pass a 'time of observation' auxiliary input to the model?
What are the limitations of this approach?

## Training with ablations for interpretability

Since the `ConvNP` operates on sets of observations, it is possible to ablate observations
and see how the model's predictions change.
Thus, the `ConvNP` admits unique interpretability opportunities.
Expand All @@ -53,6 +57,7 @@ Then, at test time, ablate context sets and measure the change in the model's pr
or performance.

## Monte Carlo sensor placement using AR sampling

The `GreedyAlgorithm` for sensor placement currently uses the model's mean prediction
to infill missing observations at query sites.
However, one could also draw multiple [AR samples](user-guide/prediction.ipynb)
Expand Down

0 comments on commit abc9a9d

Please sign in to comment.