Skip to content

Comments

sharrow cache clear script#1032

Open
jpn-- wants to merge 4 commits intoActivitySim:mainfrom
driftlesslabs:sharrow-study
Open

sharrow cache clear script#1032
jpn-- wants to merge 4 commits intoActivitySim:mainfrom
driftlesslabs:sharrow-study

Conversation

@jpn--
Copy link
Member

@jpn-- jpn-- commented Jan 29, 2026

This pull request introduces improvements to environment variable handling and logging in the main CLI and multiprocessing tasks, as well as adds a new utility script for managing the sharrow cache. The changes help improve debugging, stability, and cache management.

Environment variable handling and logging improvements:

  • Added logic in activitysim/cli/main.py to prevent multithreading by setting relevant environment variables based on command-line arguments, improving stability during benchmarking and non-fast runs.
  • Introduced the log_environment_info function in activitysim/core/mp_tasks.py, which logs environment variables for debugging if the ASIM_LOG_ENVIRON environment variable is set. This function is now called in mp_run_simulation and check_proc_status to capture environment info during multiprocessing steps. [1] [2] [3]

Codebase maintenance:

  • Cleaned up imports in activitysim/core/mp_tasks.py by moving the import of exceptions to the top and removing a duplicate import. [1] [2]

New script for cache management:

  • Added other_resources/scripts/clear_sharrow_cache.py, which scans the ActivitySim cache directory for sharrow cache folders and either moves them to a timestamped archive directory or deletes them, depending on the archive parameter.

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.

1 participant