Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ni-meister-gedi-biomass-global
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Ian
ni-meister-gedi-biomass-global
Commits
8b79013e
Commit
8b79013e
authored
2 months ago
by
Ian
Committed by
Ian
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
refactor: copy config file to output_dir instead of logging contents
parent
00664fa8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run_on_maap.py
+4
-7
4 additions, 7 deletions
run_on_maap.py
with
4 additions
and
7 deletions
run_on_maap.py
+
4
−
7
View file @
8b79013e
...
@@ -31,6 +31,7 @@ Usage:
...
@@ -31,6 +31,7 @@ Usage:
import
datetime
import
datetime
import
logging
import
logging
import
os
import
os
import
shutil
from
pathlib
import
Path
from
pathlib
import
Path
from
typing
import
Dict
,
List
from
typing
import
Dict
,
List
...
@@ -186,18 +187,14 @@ def main(
...
@@ -186,18 +187,14 @@ def main(
if
redo_of
:
if
redo_of
:
validate_redo_tag
(
run_config
)
validate_redo_tag
(
run_config
)
#
Read and log full model configuration
#
Copy config file into output directory for safekeeping
model_config_path
=
s3_url_to_local_path
(
run_config
.
model_config
)
model_config_path
=
s3_url_to_local_path
(
run_config
.
model_config
)
try
:
try
:
with
open
(
model_config_path
,
"
r
"
)
as
config_file
:
shutil
.
copy
(
model_config_path
,
output_dir
/
Path
(
model_config_path
).
name
)
full_model_config
=
config_file
.
read
()
except
Exception
as
e
:
except
Exception
as
e
:
logging
.
error
(
"
Error reading config file
"
logging
.
error
(
f
"
Error copying config file from
{
model_config_path
}
:
{
str
(
e
)
}
"
)
f
"
from
{
model_config_path
}
:
{
str
(
e
)
}
"
)
raise
raise
logging
.
debug
(
f
"
Configuration:
\n
{
full_model_config
}
"
)
# Query the CMR for granules
# Query the CMR for granules
product_granules
:
Dict
[
str
,
List
[
Granule
]]
=
{}
product_granules
:
Dict
[
str
,
List
[
Granule
]]
=
{}
for
product
in
[
"
l1b
"
,
"
l2a
"
,
"
l4a
"
]:
for
product
in
[
"
l1b
"
,
"
l2a
"
,
"
l4a
"
]:
...
...
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