HPC Functions
Monitoring you jobs with a progress bar.
This requires a Redis server to store the progress information. The following steps will guide you through setting up the Redis server and using submitit with a progress bar.
Installation:
pip install lytools_HPC
Step 1: Deploy a Redis service
DO NOT deploy it on a HPC nodes. You can use your local machine or a server with a public IP address.
Deploy redis via Docker
Compose file for Redis server:
services:
redis-progress:
image: redis:7
container_name: redis-progress
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- ./redis_data:/data
command: >
redis-server
--appendonly yes
--requirepass yourpassword
--maxmemory 2gb
--maxmemory-policy allkeys-lru
deploy:
resources:
limits:
memory: 3g
docker compose up -d # Start the Redis server
Test Redis connection
import redis
r = redis.Redis(host='your_redis_host', port=6379, password='yourpassword')
r.set('test_key', 'test_value')
print(r.get('test_key').decode())
Create redis connection configuration file
Location: ~/.config/redis/redis.conf
your_redis_host
6379
yourpassword
Step 2: Submit your jobs
from lytools_HPC import *
def my_function(params):
x,y = params
return x * y
job_name = 'Your_job_name'
x_list = [1,2,3,4,5,6,7,8,9,10]
y_list = [2,3,4,5,6,7,8,9,10,11]
params_list = list(zip(x_list,y_list))
log_folder = 'Your_log_folder'
sumbit_jobs_array(my_function, params_list, log_folder,
job_name=job_name,
job_number_limit=1,
parallel_process_per_task=2,
slurm_array_parallelism=1,
parallel_process_p_or_t='p',
cpus_per_task=10,
mem_gb=2,
timeout_min=10,
slurm_partition="general",
exclude_nodes=None,
pbar_update_freq=1,
)
Step 3: Check the log files
from lytools_HPC import *
log_folder = 'Your_log_folder'
Check_logs(log_folder).read_err_files() # Read error files
Check_logs(log_folder).read_out_files() # Read output files
Metadata
Release files for lytools-HPC 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lytools_hpc-0.0.9.tar.gz | 13.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lytools_hpc-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / lytools_hpc-0.0.9.tar.gz
| Download URL | lytools_hpc-0.0.9.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a17abb2e1da5c2e9f8f342825b08ffd7a09bb24d4a18bf29ce18d406d883ed6e
|
|
BLAKE2b-256 checksum How to use checksums |
7f2e36f84e7e762e47b0497d114feb421f99625d0b30677ed5ec08bbf05cfe78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / lytools_hpc-0.0.9-py3-none-any.whl
| Download URL | lytools_hpc-0.0.9-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39280643c433cd93bf0f0bfea6acc4018ee767659416f1240411d58f86d997b7
|
|
BLAKE2b-256 checksum How to use checksums |
5588c329ab178d294998c8e2d7bc6c356a2f96edab2e6bbac0a8d28c7c043373
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for lytools-HPC 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.