Skip to content
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

RSContext log file Max Stats #981

Open
philipbaileynar opened this issue Aug 19, 2024 · 3 comments
Open

RSContext log file Max Stats #981

philipbaileynar opened this issue Aug 19, 2024 · 3 comments
Assignees
Labels
🐛 bug Something isn't working pkg:RS-Context

Comments

@philipbaileynar
Copy link
Contributor

This is super minor...

Right at the end of the RSContext log file for Upper Bear, there's the following line in what I think is the logging during the report.

2024-08-08 22:56:38,454 DEBUG    [Debug          ] MaxStats: <rscommons.debug.ProcStats object at 0x76c0b9328890>

I get the sense that someone is converting a complex object to string, rather than extracting the property (presumably "Max Stats") into the log file. Please investigate and fix this log line so that it produces a meaningful log entry and not the memory address of a complex object.

surrounding lines of log:

2024-08-08 22:56:35,774 INFO     [collect_feature_class] Collect complete.
2024-08-08 22:56:35,872 INFO     [add_project_extents] ProjectBounds node added: /workspaces/data/rs_context/1601010101/project_bounds.geojson
2024-08-08 22:56:37,451 INFO     [Report         ] Creating report at /workspaces/data/rs_context/1601010101/rs_context.html
2024-08-08 22:56:37,504 DEBUG    [RSContext Report] Report Writing Completed
2024-08-08 22:56:37,504 INFO     [RS Context     ] Process completed successfully.
2024-08-08 22:56:38,454 DEBUG    [Debug          ] MaxStats: <rscommons.debug.ProcStats object at 0x76c0b9328890>
2024-08-08 22:56:40,076 DEBUG    [RS Context     ] Return code: {'DEM': '/workspaces/data/rs_context/1601010101/topography/dem.tif', 'Slope': '/workspaces/data/rs_context/1601010101/topography/slope.tif', 'ExistingVeg': '/workspaces/data/national_project/landfire/220/LC20_EVT_220.tif', 'HistoricVeg': '/workspaces/data/national_project/landfire/220/LC20_BPS_220.tif', 'NHD': {'WBDHU2': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU2.shp', 'WBDHU4': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU4.shp', 'WBDHU6': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU6.shp', 'WBDHU8': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU8.shp', 'WBDHU10': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU10.shp', 'WBDHU12': '/workspaces/data/download/scratch/rs_context/nhd/1601/WBDHU12.shp', 'NHDFlowline': '/workspaces/data/download/scratch/rs_context/nhd/1601/NHDFlowline.shp', 'NHDArea': '/workspaces/data/download/scratch/rs_context/nhd/1601/NHDArea.shp', 'NHDWaterbody': '/workspaces/data/download/scratch/rs_context/nhd/1601/NHDWaterbody.shp', 'NHDPlusCatchment': '/workspaces/data/download/scratch/rs_context/nhd/1601/NHDPlusCatchment.shp', 'HUC8Extent': '/workspaces/data/download/scratch/rs_context/nhd/1601/max_extent.shp'}}, [Max process usage] datetime: 2024-08-08 22:48:10, cpu_percent: 103, mem_resident: 2156.20Mb, mem_virtual: 3045.33Mb, num_children: 0, mem_children_resident: 2156.20Mb, mem_children_virtual: 3045.33Mb
2024-08-08 22:56:40,474 DEBUG    [safe_remove_dir] Directory removed: /workspaces/data/download/scratch/rs_context

Related to #978

@r-k-g
Copy link
Contributor

r-k-g commented Aug 20, 2024

Relevant line of code:

log.debug('MaxStats: {}'.format(max_obj))

@r-k-g r-k-g assigned MattReimer and unassigned r-k-g Aug 20, 2024
@philipbaileynar
Copy link
Contributor Author

Super low priority @MattReimer ... just being thorough. Rowan and I had some ideas about fixing this, but weren't 100% certain on your original intent and so we deferred to you.

@MattReimer
Copy link
Member

Intent is everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working pkg:RS-Context
Projects
None yet
Development

No branches or pull requests

3 participants