Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fireatlas_nrt
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gcorradini
fireatlas_nrt
Commits
f7781b2e
Commit
f7781b2e
authored
1 year ago
by
ranchodeluxe
Browse files
Options
Downloads
Patches
Plain Diff
two dags?
parent
a82d8732
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!106
Parallelize Uploads to S3 Where Necessary
,
!61
Additions: primary keys, speed ups (preprocessing and postprocessing), tests, scalene, reorg entire fireatlas
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fireatlas/FireRunDaskCoordinator.py
+6
-3
6 additions, 3 deletions
fireatlas/FireRunDaskCoordinator.py
maap_runtime/FireRunByRegionAndT.py
+1
-1
1 addition, 1 deletion
maap_runtime/FireRunByRegionAndT.py
with
7 additions
and
4 deletions
fireatlas/FireRunDaskCoordinator.py
+
6
−
3
View file @
f7781b2e
...
...
@@ -127,8 +127,11 @@ def Run(region: Region, tst: TimeStep, ted: TimeStep):
# blocks on region_and_t_results and then runs fire forward algorithm (which cannot be run in parallel)
fire_forward_results
=
delayed
(
job_fire_forward
)(
region_and_t_results
,
region
,
tst
,
ted
)
# block and execute dag
fire_forward_results
.
compute
()
# blocks on fire forward algorithm run and then uploads all snapshots/largefire outputs in parallel
# for some reason we can't run this step as part of the above DAG?
# uploads all snapshots/largefire outputs in parallel
data_dir
=
os
.
path
.
join
(
settings
.
LOCAL_PATH
,
settings
.
OUTPUT_DIR
,
region
[
0
],
str
(
tst
[
0
]))
fgb_upload_results
=
[
delayed
(
concurrent_copy_from_local_to_s3
)([
fire_forward_results
,],
local_filepath
)
...
...
@@ -137,10 +140,10 @@ def Run(region: Region, tst: TimeStep, ted: TimeStep):
glob
.
glob
(
os
.
path
.
join
(
data_dir
,
"
Largefire
"
,
"
*
"
,
"
*.fgb
"
))
))
]
# take the DAG and run it
# block and execute dag
dag
=
delayed
(
lambda
x
:
x
)(
fgb_upload_results
)
dag
.
compute
()
dask_client
.
close
()
...
...
This diff is collapsed.
Click to expand it.
maap_runtime/FireRunByRegionAndT.py
+
1
−
1
View file @
f7781b2e
...
...
@@ -18,7 +18,7 @@ def validate_json(s):
@timed
def
Run
(
region
:
fireatlas
.
FireType
.
Region
,
tst
:
fireatlas
.
FireType
.
TimeStep
):
FireLog
.
logger
.
info
(
f
"
Running preprocessing code for
{
region
[
0
]
}
at
{
tst
=
}
with source
{
settings
.
FIRE_SOURCE
}
"
)
FireRunDaskCoordinator
.
job_preprocess_region_t
(
None
,
None
,
region
,
tst
)
FireRunDaskCoordinator
.
job_preprocess_region_t
(
[
None
,
]
,
region
,
tst
)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment