We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tried the Echo Example in the mosec documentation and failed to launch.
Echo Example
Install mosec via pip install -U mosec
pip install -U mosec
Then run the exact same code in echo.py
import time from typing import List from mosec import Server, ValidationError, Worker, get_logger logger = get_logger() class Preprocess(Worker): """Sample Class.""" example = {"time": 0} def forward(self, data: dict) -> float: logger.debug("pre received %s", data) # Customized, simple input validation try: count_time = float(data["time"]) except KeyError as err: raise ValidationError(f"cannot find key {err}") from err return count_time class Inference(Worker): """Sample Class.""" example = [0, 1e-5, 2e-4] def forward(self, data: List[float]) -> List[float]: logger.info("sleeping for %s seconds", max(data)) time.sleep(max(data)) return data class Postprocess(Worker): """Sample Class.""" def forward(self, data: float) -> dict: logger.debug("post received %f", data) return {"msg": f"sleep {data} seconds"} if __name__ == "__main__": server = Server() server.append_worker(Preprocess) server.append_worker(Inference, max_batch_size=32) server.append_worker(Postprocess) server.run()
and run with: python echo.py
python echo.py
No response
mosec-0.8.3 Python 3.10.0 macOS Sonoma, M1 Macbook Pro
Only fails in macOS, it works on my Linux box.
The text was updated successfully, but these errors were encountered:
There is no ARM release now. I think we can add it since GitHub has ARM runners.
Related to the upstream issues:
Sorry, something went wrong.
Hi @oliverhu, 0.8.4 is released with macOS ARM64 support. You can try it with pip install mosec==0.8.4 on macOS M1.
pip install mosec==0.8.4
@kemingy thanks for the prompt response & fix!
Successfully merging a pull request may close this issue.
Describe the bug
Tried the
Echo Example
in the mosec documentation and failed to launch.To Reproduce
Install mosec via
pip install -U mosec
Then run the exact same code in echo.py
and run with:
python echo.py
Expected behavior
No response
The mosec version
mosec-0.8.3
Python 3.10.0
macOS Sonoma, M1 Macbook Pro
Additional context
Only fails in macOS, it works on my Linux box.
The text was updated successfully, but these errors were encountered: