Skip to content

Passing string value for custom profiler to the trainer. #16563

Discussion options

You must be logged in to vote

Dear @assassin1991,

Unfortunately, PyTorch Lightning doesn't support passing new profiler strings as those are already registered in the framework.

Here are several options:

  1. Pass the profiler directly to the Trainer. Simpler solution IMO especially if you are exposing arguments to the profiler.
  2. Patch the Trainer internal to register your profiler string but this might break if internal changes
  3. Open a PR enabling users to register new profiler names. If your profiler subclasses PyTorch Lightning profilers and register a static name, I believe it is possible for the Trainer to search all the available subclass of the BaseProfiler and perform automatic resolution of the Profiler class.

Best,

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ankitgola005
Comment options

Answer selected by ankitgola005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment