Skip to content

update dark vessel detection example #351

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

Merged
merged 13 commits into from
Jan 27, 2025
Merged

Conversation

sterfd
Copy link
Contributor

@sterfd sterfd commented Jan 23, 2025

No description provided.

Copy link
Collaborator

@MaxLenormand MaxLenormand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition here! I'm not sure if you're done yet but I took a look already

We can run this UDF a single time to make sure it works:

```python showLineNumbers
single_ais_month = fused.run(read_ais_from_noaa_udf, datestr="2024_09_01")
```

{/* we have /mnt/cache/ here but /tmp/fused in 3.1 */}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a bit of a confusing part. To give you context:

  • /tmp/ -> When running code locally on your computer
  • /mount/ (which used to be /mnt/cache/ ) is when running on Fused server

We should also mention that we're running some of this code in workbench & some of it in a jupyter notebook, I think that might not be that obvious

Copy link
Contributor Author

@sterfd sterfd Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote a sentence towards the end of 3.0 (line 115) that we're doing section 3 locally.

Ok, I played around with local vs udf code and I think I understand now. I will make a note of that in the doc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this note in a comment: NOTE: As of Jan 2024, fused.file_path() doesn't work reliably across real time, local & run_remote()

What is unreliable about it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was related to this: https://www.notion.so/fusedio/fused-file_path-has-inconsistent-behaviour-on-local-real-time-and-batch-173899d3b76380068339ec755bbc5b8f?pvs=4

We just need to explain better how fused.file_path() works
But I think this should also be done in the top level functions

:::

Fused provides a simple way to do this with the [ingestion process](/core-concepts/data_ingestion/). Our ingestion pipeline will then slice the dataset in order to make
{/* not sure what this sentence was going for... Our ingestion pipeline will then slice the dataset in order to make */}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch, let's remove

@@ -362,9 +338,11 @@ We're going to use the [Microsoft Planetary Computer Sentinel-1 Ground Range Det

Let's start with a basic UDF just returning our area of interest:

{/* why was this function named s1_udf */}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An incomplete copy + paste! Good catch

Feel free to remove this comment too :)

sterfd and others added 3 commits January 23, 2025 14:35
Co-authored-by: Maxime Lenormand <44133329+MaxLenormand@users.noreply.github.com>
Co-authored-by: Maxime Lenormand <44133329+MaxLenormand@users.noreply.github.com>
@sterfd sterfd force-pushed the example_dark_vessel_updates branch from bc72161 to 0aa075e Compare January 23, 2025 19:35
Copy link
Collaborator

@MaxLenormand MaxLenormand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job

@sterfd sterfd changed the title Updates to User_Guide>Examples>Dark_Vessel until section 6 update dark vessel detection example Jan 24, 2025
sterfd and others added 4 commits January 24, 2025 06:52
Co-authored-by: Maxime Lenormand <44133329+MaxLenormand@users.noreply.github.com>
Co-authored-by: Maxime Lenormand <44133329+MaxLenormand@users.noreply.github.com>
@sterfd sterfd marked this pull request as ready for review January 26, 2025 16:34
Copy link
Collaborator

@MaxLenormand MaxLenormand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, this is looking very nice! 👍

- [`fused`](/python-sdk/#install)
- [`pandas`](https://pandas.pydata.org/)
- [`geopandas`](https://geopandas.org/en/stable/index.html)
- [`notebook`](https://pypi.org/project/notebook/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not really a requirement :)

Suggested change
- [`notebook`](https://pypi.org/project/notebook/)

We can add here that we'll be running things through a notebook so recommend people have Jupyter notebooks of some sort, but we don't directly use notebook (unless you added it?)


:::note
Fused UDFs by default run on serverless instances, so their local storage changes at every run. To keep data persistent across runs we use shared mounted storage across all the instances of your team
:::

`fused.file_path()` returns the mount path of any file we'd like to create
`fused.file_path()` returns the mount path of any file we'd like to create. When run locally, it returns the local `/tmp/fused/` directory on your machine.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a wonderful explanation! Great use of the tabs

We can leave this here for now, but we should (in a next PR) move this to its own dedicated page as this is useful not only in this example but for every use case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turned this into a new card

@sterfd sterfd merged commit 3db4610 into main Jan 27, 2025
1 check passed
@sterfd sterfd deleted the example_dark_vessel_updates branch January 27, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants