Skip to content

Support optionally running Python compiler services in-process #431

Open
@ChrisCummins

Description

@ChrisCummins

🚀 Feature

Motivation

The goal is to make it easier for developers to debug new compiler services by removing the inter-process comms layer that can obfuscate stack traces and make it harder to trace the cause of bugs. See #318.

Pitch

Extend the CompilerGym class constructor's service argument to take CompilationSession subclass type. This would then start an in-process gRPC server, enabling more debuggable tracebacks in case of failures:

>>> env = CompilerEnv(service=MyCompilationSession, rewards=..., dataset=...)

>>> env.step(action_that_fails)
Traceback: ...

Alternatives

Figure out a way to better propagate errors from compiler services that can be applied to all languages, not just Python.

Additional context

Thanks @hughleat for the suggestion and initial discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions