Skip to content

Move the runner into a separate package with minimal dependencies #557

Open
@kshpytsya

Description

@kshpytsya

Is there an existing proposal for this?

  • I have searched the existing proposals

Is your feature request related to a problem?

The system I am currently working on involves some confidential customer data to which regular developers do not have access. Due to the complex nature of ML algorithms and libraries involved, sometimes we encounter anomalous memory usage which we cannot easily reproduce with our test data set. I am considering integration of some memory profiling mechanism, possibly involving memray which would be selectively enabled in production environment to help us to get insights into problematic cases without requiring access to customer data.

For multiple reasons (security, reliability, docker image size to name a few) we try to minimize the number of our dependencies. Memray has a number of dependencies which are unnecessary for trace collection:

memray/setup.py

Lines 91 to 96 in 578e02d

install_requires = [
"jinja2 >= 2.9",
"typing_extensions; python_version < '3.8.0'",
"rich >= 11.2.0",
"textual >= 0.41.0",
]

and those have their own dependencies as well.

Describe the solution you'd like

It would be great to split memray into two packages, tentatively named memray-core and memray. The former would only be able to perform collection, and the later would do everything memray does today.

Alternatives you considered

Another possibility would be having all the dependencies not related to memray.Tracker to be under "extras" but that would probably be a nuisance for most ordinary users who would want a simple pip install memray to install everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PackagingRelated to packaging and releasingenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions