Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pymarian" CLI, a proxy to "marian" #1029

Closed
wants to merge 4 commits into from
Closed

Conversation

thammegowda
Copy link
Collaborator

@thammegowda thammegowda commented Aug 9, 2024

Description

Added pymarian CLI which is proxy to the currently used marian binary. This enables PyPI based distribution of marian: pip install pymarian to get started, except replace marian -> pymarian in CLI.

List of changes:

  • the main() function is now bound to pymarian.main to achieve this
  • main() function now lists the subcommands if no arguments are given or explicitly "?" is passed. I am hoping this is useful for new users. Note: marian --help behavior is currently mapped to marian train --help, hence picked ? to avoid breaking changes
  • added pymarian.help() method to list config options (printed to STDOUT). Maybe useful for new users in notebooks
  • Minor improvements to pymarian.Evaluator class. model and vocab args can now be strings (previously Path)

How to test

# build and install pymarian asusual
cmake -B build -DPYMARIAN=on -DCOMPILE_CUDA=off .
cmake --build build -j
pip install build/pymarian*.whl
# try these commands

pymarian 
pymarian train --help
pymarian decode --help
pymarian evaluate --help

Checklist

  • I have tested the code manually
  • I have run regression tests
  • I have read and followed CONTRIBUTING.md
  • I have updated CHANGELOG.md

@thammegowda thammegowda changed the title "pymarian" CLI, a proxy to "marian" binary, but made available in PATH when python package is installed "pymarian" CLI, a proxy to "marian" binary Aug 9, 2024
@thammegowda thammegowda changed the title "pymarian" CLI, a proxy to "marian" binary "pymarian" CLI, a proxy to "marian" Aug 9, 2024
src/command/marian_main.cpp Show resolved Hide resolved
@thammegowda
Copy link
Collaborator Author

Moved this PR to internal fork. Hence closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants