You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

unidist

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unidist - pypi Package Compare versions

Comparing version
0.4.0
to
0.4.1
+3
-3
PKG-INFO
Metadata-Version: 2.1
Name: unidist
Version: 0.4.0
Version: 0.4.1
Summary: Unified Distributed Execution

@@ -23,4 +23,4 @@ Home-page: https://github.com/modin-project/unidist

<a href="https://github.com/modin-project/unidist/actions"><img src="https://github.com/modin-project/unidist/workflows/master/badge.svg" align="center"></a>
<a href="https://unidist.readthedocs.io/en/latest/?badge=latest"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=latest" align="center"></a>
<a href="https://pypi.org/project/unidist/"><img src="https://badge.fury.io/py/unidist.svg" alt="PyPI version" align="center"></a>
<a href="https://unidist.readthedocs.io/en/0.4.1/?badge=0.4.1"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=0.4.1" align="center"></a>
<a href="https://pypi.org/project/unidist/0.4.1/"><img src="https://img.shields.io/badge/pypi-0.4.1-blue.svg" alt="PyPI version" align="center"></a>
</p>

@@ -27,0 +27,0 @@

@@ -8,4 +8,4 @@ <p align="center">

<a href="https://github.com/modin-project/unidist/actions"><img src="https://github.com/modin-project/unidist/workflows/master/badge.svg" align="center"></a>
<a href="https://unidist.readthedocs.io/en/latest/?badge=latest"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=latest" align="center"></a>
<a href="https://pypi.org/project/unidist/"><img src="https://badge.fury.io/py/unidist.svg" alt="PyPI version" align="center"></a>
<a href="https://unidist.readthedocs.io/en/0.4.1/?badge=0.4.1"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=0.4.1" align="center"></a>
<a href="https://pypi.org/project/unidist/0.4.1/"><img src="https://img.shields.io/badge/pypi-0.4.1-blue.svg" alt="PyPI version" align="center"></a>
</p>

@@ -12,0 +12,0 @@

Metadata-Version: 2.1
Name: unidist
Version: 0.4.0
Version: 0.4.1
Summary: Unified Distributed Execution

@@ -23,4 +23,4 @@ Home-page: https://github.com/modin-project/unidist

<a href="https://github.com/modin-project/unidist/actions"><img src="https://github.com/modin-project/unidist/workflows/master/badge.svg" align="center"></a>
<a href="https://unidist.readthedocs.io/en/latest/?badge=latest"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=latest" align="center"></a>
<a href="https://pypi.org/project/unidist/"><img src="https://badge.fury.io/py/unidist.svg" alt="PyPI version" align="center"></a>
<a href="https://unidist.readthedocs.io/en/0.4.1/?badge=0.4.1"><img alt="" src="https://readthedocs.org/projects/unidist/badge/?version=0.4.1" align="center"></a>
<a href="https://pypi.org/project/unidist/0.4.1/"><img src="https://img.shields.io/badge/pypi-0.4.1-blue.svg" alt="PyPI version" align="center"></a>
</p>

@@ -27,0 +27,0 @@

@@ -11,7 +11,7 @@

{
"date": "2023-07-07T17:46:53+0200",
"date": "2023-07-14T09:41:01+0200",
"dirty": false,
"error": null,
"full-revisionid": "87c564ddd6783b20af5eca026e6741f98855e8dd",
"version": "0.4.0"
"full-revisionid": "5406937f574fa2abcc78478c55eb9810739934cf",
"version": "0.4.1"
}

@@ -18,0 +18,0 @@ ''' # END VERSION_JSON

@@ -290,3 +290,3 @@ # Copyright (C) 2021-2023 Modin authors

def mpi_recv_object(comm, source_rank, cancel_recv=False):
def mpi_recv_object(comm, source_rank):
"""

@@ -301,12 +301,7 @@ Receive an object of a standard Python data type.

Source MPI process to receive data from.
cancel_recv : bool, default: False
Whether to cancel an incoming message or not.
This can happen when a worker is getting to shutdown so
there is no need to receive the message.
Returns
-------
object or None
Received data object from another MPI process or
``None`` if the message was cancelled.
object
Received data object from another MPI process.

@@ -318,14 +313,3 @@ Notes

"""
backoff = MpiBackoff.get()
status = MPI.Status()
tag = common.MPITag.OBJECT
while not comm.Iprobe(source=source_rank, tag=tag):
time.sleep(backoff)
request = comm.irecv(source=source_rank, tag=tag)
if cancel_recv:
request.cancel()
data = request.wait(status=status)
if status.Is_cancelled():
data = None
return data
return comm.recv(source=source_rank, tag=common.MPITag.OBJECT)

@@ -635,3 +619,3 @@

def recv_complex_data(comm, source_rank, cancel_recv=False):
def recv_complex_data(comm, source_rank):
"""

@@ -648,6 +632,2 @@ Receive the data that may consist of different user provided complex types, lambdas and buffers.

Source MPI process to receive data from.
cancel_recv : bool, default: False
Whether to cancel an incoming message or not.
This can happen when a worker is getting to shutdown so
there is no need to receive the message.

@@ -657,4 +637,3 @@ Returns

object
Received data object from another MPI process or
``None`` if the message was cancelled.
Received data object from another MPI process.

@@ -666,41 +645,16 @@ Notes

"""
# Recv main message pack buffer.
# First MPI call uses busy wait loop to remove possible contention
# in a long running data receive operations.
backoff = MpiBackoff.get()
status = MPI.Status()
info = mpi_busy_wait_recv(comm, source_rank)
info = comm.recv(source=source_rank, tag=common.MPITag.OBJECT)
msgpack_buffer = bytearray(info["s_data_len"])
buffer_count = info["buffer_count"]
raw_buffers = list(map(bytearray, info["raw_buffers_len"]))
cancelled_requests = []
with pkl5._bigmpi as bigmpi:
while not comm.Iprobe(source=source_rank, tag=common.MPITag.BUFFER):
time.sleep(backoff)
request = comm.Irecv(
bigmpi(msgpack_buffer), source=source_rank, tag=common.MPITag.BUFFER
)
if cancel_recv:
request.Cancel()
request.Wait(status=status)
cancelled_requests.append(status.Is_cancelled())
comm.Recv(bigmpi(msgpack_buffer), source=source_rank, tag=common.MPITag.BUFFER)
for rbuf in raw_buffers:
while not comm.Iprobe(source=source_rank, tag=common.MPITag.BUFFER):
time.sleep(backoff)
request = comm.Irecv(
bigmpi(rbuf), source=source_rank, tag=common.MPITag.BUFFER
)
if cancel_recv:
request.Cancel()
request.Wait(status=status)
cancelled_requests.append(status.Is_cancelled())
comm.Recv(bigmpi(rbuf), source=source_rank, tag=common.MPITag.BUFFER)
if any(cancelled for cancelled in cancelled_requests):
return None
else:
# Set the necessary metadata for unpacking
deserializer = ComplexDataSerializer(raw_buffers, buffer_count)
# Set the necessary metadata for unpacking
deserializer = ComplexDataSerializer(raw_buffers, buffer_count)
# Start unpacking
return deserializer.deserialize(msgpack_buffer)
# Start unpacking
return deserializer.deserialize(msgpack_buffer)

@@ -707,0 +661,0 @@

@@ -103,9 +103,4 @@ # Copyright (C) 2021-2023 Modin authors

if operation_type == common.Operation.EXECUTE:
request = communication.recv_complex_data(
mpi_state.comm,
source_rank,
cancel_recv=ready_to_shutdown_posted,
)
if request is not None and not ready_to_shutdown_posted:
request = communication.recv_complex_data(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
# Execute the task if possible

@@ -120,8 +115,4 @@ pending_request = task_store.process_task_request(request)

elif operation_type == common.Operation.GET:
request = communication.mpi_recv_object(
mpi_state.comm,
source_rank,
cancel_recv=ready_to_shutdown_posted,
)
if request is not None and not ready_to_shutdown_posted:
request = communication.mpi_recv_object(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
request["id"] = object_store.get_unique_data_id(request["id"])

@@ -133,8 +124,4 @@ request_store.process_get_request(

elif operation_type == common.Operation.PUT_DATA:
request = communication.recv_complex_data(
mpi_state.comm,
source_rank,
cancel_recv=ready_to_shutdown_posted,
)
if request is not None and not ready_to_shutdown_posted:
request = communication.recv_complex_data(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
w_logger.debug(

@@ -157,8 +144,4 @@ "PUT (RECV) {} id from {} rank".format(

elif operation_type == common.Operation.PUT_OWNER:
request = communication.mpi_recv_object(
mpi_state.comm,
source_rank,
cancel_recv=ready_to_shutdown_posted,
)
if request is not None and not ready_to_shutdown_posted:
request = communication.mpi_recv_object(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
request["id"] = object_store.get_unique_data_id(request["id"])

@@ -175,3 +158,3 @@ object_store.put_data_owner(request["id"], request["owner"])

request = communication.mpi_recv_object(mpi_state.comm, source_rank)
if request is not None and not ready_to_shutdown_posted:
if not ready_to_shutdown_posted:
w_logger.debug("WAIT for {} id".format(request["id"]._id))

@@ -182,6 +165,4 @@ request["id"] = object_store.get_unique_data_id(request["id"])

elif operation_type == common.Operation.ACTOR_CREATE:
request = communication.recv_complex_data(
mpi_state.comm, source_rank, cancel_recv=ready_to_shutdown_posted
)
if request is not None and not ready_to_shutdown_posted:
request = communication.recv_complex_data(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
cls = request["class"]

@@ -194,7 +175,4 @@ args = request["args"]

elif operation_type == common.Operation.ACTOR_EXECUTE:
request = communication.recv_complex_data(
mpi_state.comm, source_rank, cancel_recv=ready_to_shutdown_posted
)
if request is not None and not ready_to_shutdown_posted:
request = communication.recv_complex_data(mpi_state.comm, source_rank)
if not ready_to_shutdown_posted:
# Prepare the data

@@ -225,2 +203,3 @@ method_name = request["task"]

request_store.clear_wait_requests()
async_operations.finish()
communication.mpi_send_operation(

@@ -233,3 +212,2 @@ mpi_state.comm,

elif operation_type == common.Operation.SHUTDOWN and ready_to_shutdown_posted:
async_operations.finish()
w_logger.debug("Exit worker event loop")

@@ -236,0 +214,0 @@ if not MPI.Is_finalized():