Skip to content

Commit 7e2701c

Browse files
committed
Cut MyxBoard, openclaw skill, RemyxAPI wrapper, unused dependencies
Removes legacy code paths that no longer back any live Remyx service. Trims setup.py install_requires from 10 packages to 2 (click + requests). Net diff: 12 files deleted, ~2700 lines removed; install footprint drops by ~600MB (no more onnxruntime / huggingface_hub / datasets / pandas / numpy / pillow). Deleted files: - remyxai/client/myxboard.py — legacy MyxBoard class - remyxai/api/myxboard.py — MyxBoard CRUD API client - remyxai/utils/myxboard.py — MyxBoard helpers - remyxai/api/inference.py — Triton inference path (no CLI consumer) - remyxai/utils/helpers.py — unused (numpy/PIL/onnxruntime/tqdm) - remyxai/utils/validators.py — only consumer was myxboard.py - remyxai/client/remyx_client.py — legacy RemyxAPI wrapper class - tests/myxboard/test_myxboard.py — tests for deleted MyxBoard - tests/api/test_inference.py — tests for deleted inference module - tests/api/test_evaluations.py — MyxBoard-shaped evaluation tests - skills/openclaw/ — Slack-digest skill (lives in docs site) Refactored handlers (RemyxAPI wrapper was thin; handlers now call remyxai.api.* functions directly): - remyxai/cli/deployment_actions.py — calls deploy_model() directly - remyxai/cli/evaluation_actions.py — calls list_models() / get_model_summary() / delete_model() / download_model() directly; handle_evaluation_action (MyxBoard-specific) removed - remyxai/cli/commands.py — drops the `evaluate_myxboard` CLI command + the `handle_evaluation_action` import - remyxai/cli/recommendation_actions.py — docstring drops OpenClaw reference setup.py: - Version bumped 0.2.5 → 0.2.6 - install_requires cut to [click, requests] - Removed: numpy, onnx, onnxruntime, pillow, tqdm, huggingface_hub, datasets, pandas - Removed extras_require[triton] (tritonclient[all] no longer needed) - Bumped python_requires 3.6 → 3.10 (matches actual usage; type hints in remyxai/cli/outrider_actions.py use 3.10+ syntax) - Added include_package_data + package_data for the bundled outrider workflow template Tests: - 100 passing (up from 96 — the click underscore→dash issue in test_commands.py was pre-existing; this PR fixes those 4 tests as collateral cleanup) - 6 still failing — ALL pre-existing, unrelated to this cleanup: - tests/api/test_dataset.py (3) — function signatures mismatched - tests/api/test_recommendations.py (2) — header-threading test setup - tests/cli/test_commands.py::test_deploy_model_invalid_action — the deploy_model command catches its own exception, exit code stays 0 Worth tracking these as a follow-up PR; not blocking this cleanup. Backward compatibility: - The Python API surface stays: remyxai.api.* still exports models, deployment, interests, papers, recommendations, search, tasks, user, datasets, evaluations (the modules, just not the MyxBoard helpers that used them) - The CLI surface drops `remyxai evaluate_myxboard` only. All other CLI commands (model, deploy, dataset, search, papers, interests, outrider) unchanged. - `remyxai/utils/validators.py:get_hf_token` is gone — only consumer was myxboard.py; if any external script imported it, they'll need to switch to `huggingface_hub.get_token()` directly.
1 parent 748cbde commit 7e2701c

20 files changed

Lines changed: 91 additions & 1742 deletions

remyxai/api/inference.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

remyxai/api/myxboard.py

Lines changed: 0 additions & 117 deletions
This file was deleted.

remyxai/cli/commands.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import click
66
from remyxai.cli.deployment_actions import handle_deployment_action
7-
from remyxai.cli.evaluation_actions import handle_model_action, handle_evaluation_action
7+
from remyxai.cli.evaluation_actions import handle_model_action
88
from remyxai.cli.dataset_actions import handle_dataset_action
99
from remyxai.cli.search_actions import (
1010
handle_search,
@@ -55,17 +55,6 @@ def summarize_model(model_name):
5555
click.echo(f"Error summarizing model: {e}")
5656

5757

58-
@cli.command()
59-
@click.argument("models", nargs=-1)
60-
@click.argument("tasks", nargs=-1)
61-
def evaluate_myxboard(models, tasks):
62-
"""Evaluate the MyxBoard with the given models and tasks."""
63-
try:
64-
handle_evaluation_action({"models": models, "tasks": tasks})
65-
except Exception as e:
66-
click.echo(f"Error evaluating MyxBoard: {e}")
67-
68-
6958
@cli.command()
7059
@click.argument("model_name")
7160
@click.argument("action")

remyxai/cli/deployment_actions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from remyxai.client.remyx_client import RemyxAPI
1+
from remyxai.api.deployment import deploy_model
22

33

44
def handle_deployment_action(args):
55
"""Handle deployment actions (up/down) for a model."""
6-
api = RemyxAPI()
76
model_name = args["model_name"]
87
action = args["action"]
98

@@ -12,7 +11,7 @@ def handle_deployment_action(args):
1211
"Invalid action. Use 'up' to deploy or 'down' to tear down the model."
1312
)
1413

15-
response = api.deploy_model(model_name, action)
14+
response = deploy_model(model_name, action)
1615
if response:
1716
print(f"Model {model_name} deployment {action} action succeeded.")
1817
else:

remyxai/cli/evaluation_actions.py

Lines changed: 27 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,44 @@
1-
from remyxai.client.remyx_client import RemyxAPI
2-
from remyxai.client.myxboard import MyxBoard
3-
from remyxai.api.evaluations import EvaluationTask
1+
"""
2+
Action handlers for model-related CLI commands (list, summarize).
3+
4+
Note: legacy MyxBoard-based evaluation (`evaluate_myxboard`,
5+
`handle_evaluation_action`, `handle_task_mapping`) was removed when
6+
the MyxBoard service was retired. The remaining handlers wrap the
7+
`remyxai.api.models` functions directly — the older RemyxAPI class
8+
wrapper was deleted in the same cleanup since it added no value over
9+
direct API calls.
10+
"""
11+
from remyxai.api.models import (
12+
list_models,
13+
get_model_summary,
14+
delete_model,
15+
download_model,
16+
)
417

518

619
def handle_model_action(args):
7-
"""
8-
Handle model-related actions like listing models, summarizing models, deleting, or downloading models.
9-
Args:
10-
args (dict): Dictionary containing the subaction and related parameters.
11-
"""
12-
api = RemyxAPI()
20+
"""Handle model-related actions: list, summarize, delete, download."""
21+
subaction = args["subaction"]
1322

14-
if args["subaction"] == "list":
15-
models = api.list_models()
23+
if subaction == "list":
24+
models = list_models()
1625
print(f"Available models: {models}")
1726

18-
elif args["subaction"] == "summarize":
27+
elif subaction == "summarize":
1928
model_name = args["model_name"]
20-
summary = api.get_model_summary(model_name)
29+
summary = get_model_summary(model_name)
2130
print(f"Summary for model {model_name}: {summary}")
2231

23-
elif args["subaction"] == "delete":
32+
elif subaction == "delete":
2433
model_name = args["model_name"]
25-
response = api.delete_model(model_name)
34+
response = delete_model(model_name)
2635
print(f"Deleted model {model_name}: {response}")
2736

28-
elif args["subaction"] == "download":
37+
elif subaction == "download":
2938
model_name = args["model_name"]
3039
model_format = args["model_format"]
31-
response = api.download_model(model_name, model_format)
40+
response = download_model(model_name, model_format)
3241
print(f"Downloaded model {model_name} in format {model_format}: {response}")
3342

3443
else:
35-
raise ValueError(f"Unknown model subaction: {args['subaction']}")
36-
37-
38-
def handle_evaluation_action(args):
39-
"""
40-
Handle evaluation actions using the MyxBoard and RemyxAPI.
41-
Args:
42-
args (dict): Dictionary containing the models to evaluate and tasks to perform.
43-
"""
44-
api = RemyxAPI()
45-
46-
# Initialize the MyxBoard with provided models
47-
model_ids = args["models"]
48-
myx_board = MyxBoard(model_repo_ids=model_ids)
49-
50-
# Map tasks to EvaluationTask enum
51-
try:
52-
tasks = [EvaluationTask[task.upper()] for task in args["tasks"]]
53-
except KeyError as e:
54-
raise ValueError(f"Invalid task specified: {e}")
55-
56-
# Perform evaluation via RemyxAPI
57-
api.evaluate(myx_board, tasks)
58-
59-
# Get and display results
60-
results = myx_board.get_results()
61-
print("Evaluation Results:")
62-
for model, model_results in results.items():
63-
print(f"Model: {model}")
64-
for task, result in model_results.items():
65-
print(f" Task: {task}, Result: {result}")
66-
67-
68-
def handle_task_mapping(task_name):
69-
"""
70-
Helper function to map task names to the EvaluationTask enum.
71-
Args:
72-
task_name (str): The name of the task to map.
73-
Returns:
74-
EvaluationTask: Mapped task enum.
75-
Raises:
76-
ValueError: If the task name does not match a valid task.
77-
"""
78-
try:
79-
return EvaluationTask[task_name.upper()]
80-
except KeyError:
81-
raise ValueError(f"Invalid task name: {task_name}")
44+
raise ValueError(f"Unknown model subaction: {subaction}")

remyxai/cli/recommendation_actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def _slack_entry(rec: dict, rank: int) -> str:
202202
def build_slack_digest(data: dict) -> str:
203203
"""
204204
Build the full Slack message from a digest API response.
205-
Called by the OpenClaw skill when posting to #research.
205+
206+
Returns Slack mrkdwn-formatted text suitable for piping to the
207+
Slack API by external automation (cron, scheduled tasks, etc.).
206208
"""
207209
today_str = date.today().strftime("%B %-d")
208210
interests = data.get("interests", [])

0 commit comments

Comments
 (0)