Skip to content
Skills Library
Programming · Analysis

sciris-parallel

/sciris-parallel

Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.

Repository
sciris ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.

Original author description

Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.

How it works

  1. Basic Parallelization
  2. Resource-Limited Parallelization
  3. Advanced: Parallel Class
  4. Profiling
Original SKILL.md headings · 71 lines, 250 words
SKILL.md preview
---
name: sciris-parallel
description: Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.
---

# Sciris Parallelization and Profiling

Reference for parallel execution and performance analysis. See full tutorial: `docs/tutorials/tut_parallel.ipynb`.

If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.

## Basic Parallelization

```python
# Simple: iterate over one argument
results = sc.parallelize(func, [1, 2, 3])

# With keyword arguments
results = sc.parallelize(complex_func, [1, 2, 3], arg2=10)

# Multiple iteration arguments (dict of lists)
results = sc.parallelize(mult, iterkwargs={'x': [1,2,3], 'y': [2,3,4]})

# Multiple iteration arguments (list of tuples)
results = sc.parallelize(mult, iterarg=[(1,2), (2,3), (3,4)])

# Multiple iteration arguments (list of dicts)
results = sc.parallelize(mult, iterkwargs=[{'x':1, 'y':2}, {'x':2, 'y':3}])
```

## Resource-Limited Parallelization

```python
results = sc.parallelize(
    func     = my_func,
    iterarg  = range(200),
    maxcpu   = 0.8,       # Don't exceed 80% CPU
    maxmem   = 0.9,       # Don't exceed 90% memory
    interval = 0.2,       # Re-check interval (seconds)
)
```

## Advanced: Parallel Class

```python
P = sc.Parallel(
    func = slow_func,
    iterarg = range(10),
    parallelizer = 'multiprocess-async',  # Async execution
    die = False,                          # Continue on failure
)
P.run_async()
P.monitor()                               # Watch progress
P.finalize()                              # Collect results

print(P.success)       # Per-job success flags
print(P.exceptions)    # Any exceptions that occurred
print(P.results)       # Results (the exception for failed jobs)
print(P.times)         # Per-job timing
```

## Profiling

### Benchmarking
```python
bm = sc.benchmark()    # CPU performance in MOPS
ml = sc.memload()      # System memory load
ram = sc.checkram()    # Python process RAM usage
```

### Line Profiling
```python
sc.profile(my_func)    # Shows time per line (like line_profiler)
```

Versions

The database has no other skills named sciris-parallel.

Database snapshot: 13.11.2026 · package version f43e4c5364c7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95sciris-intro
    Use when the user needs to implement a basic Sciris features — finding array values, plotting with date formatting, objdict containers, saving/loading objects, or parallelization.
  • 95sciris-files
    Use when saving or loading files with Sciris — sc.save, sc.load, sc.savejson, sc.loadjson, sc.saveyaml, sc.readyaml, sc.savearchive, sc.loadarchive, sc.savefig, sc.loadmetadata, sc.getfilelist, sc.thispath, sc.makefilepath, sc.rmpath, sc.metadata, sc.compareversions, sc.require,…
  • 100python-parallelization
    Transform sequential Python code into parallel/concurrent implementations. Use when asked to parallelize Python code, improve code performance through concurrency, convert loops to parallel execution, or identify parallelization opportunities. Handles CPU-bound…
  • 100performance-profiling
    Finds and fixes backend and application performance problems by measuring first - define the target metric, reproduce under realistic load, profile CPU, memory, I/O and locks, fix the biggest bottleneck, re-measure, and add a regression guard. Use when code or a service is slow,…
  • 100profiling-application-performance
    Execute this skill enables AI assistant to profile application performance, analyzing cpu usage, memory consumption, and execution time. it is triggered when the user requests performance analysis, bottleneck identification, or optimization recommendations. the... Use when…
  • 100profiling-application-performance
    Execute this skill enables AI assistant to profile application performance, analyzing cpu usage, memory consumption, and execution time. it is triggered when the user requests performance analysis, bottleneck identification, or optimization recommendations. the... Use when…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.