EvoScientist 0.0.1.dev4__py3-none-any.whl → 0.1.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. EvoScientist/EvoScientist.py +26 -62
  2. EvoScientist/__init__.py +0 -19
  3. EvoScientist/backends.py +0 -26
  4. EvoScientist/cli.py +1111 -498
  5. EvoScientist/middleware.py +8 -61
  6. EvoScientist/stream/__init__.py +0 -25
  7. EvoScientist/stream/utils.py +16 -23
  8. EvoScientist/tools.py +2 -75
  9. evoscientist-0.1.0rc1.dist-info/METADATA +199 -0
  10. evoscientist-0.1.0rc1.dist-info/RECORD +21 -0
  11. evoscientist-0.1.0rc1.dist-info/entry_points.txt +2 -0
  12. EvoScientist/config.py +0 -274
  13. EvoScientist/llm/__init__.py +0 -21
  14. EvoScientist/llm/models.py +0 -99
  15. EvoScientist/memory.py +0 -715
  16. EvoScientist/onboard.py +0 -725
  17. EvoScientist/paths.py +0 -44
  18. EvoScientist/skills/accelerate/SKILL.md +0 -332
  19. EvoScientist/skills/accelerate/references/custom-plugins.md +0 -453
  20. EvoScientist/skills/accelerate/references/megatron-integration.md +0 -489
  21. EvoScientist/skills/accelerate/references/performance.md +0 -525
  22. EvoScientist/skills/bitsandbytes/SKILL.md +0 -411
  23. EvoScientist/skills/bitsandbytes/references/memory-optimization.md +0 -521
  24. EvoScientist/skills/bitsandbytes/references/qlora-training.md +0 -521
  25. EvoScientist/skills/bitsandbytes/references/quantization-formats.md +0 -447
  26. EvoScientist/skills/find-skills/SKILL.md +0 -133
  27. EvoScientist/skills/find-skills/scripts/install_skill.py +0 -211
  28. EvoScientist/skills/flash-attention/SKILL.md +0 -367
  29. EvoScientist/skills/flash-attention/references/benchmarks.md +0 -215
  30. EvoScientist/skills/flash-attention/references/transformers-integration.md +0 -293
  31. EvoScientist/skills/llama-cpp/SKILL.md +0 -258
  32. EvoScientist/skills/llama-cpp/references/optimization.md +0 -89
  33. EvoScientist/skills/llama-cpp/references/quantization.md +0 -213
  34. EvoScientist/skills/llama-cpp/references/server.md +0 -125
  35. EvoScientist/skills/lm-evaluation-harness/SKILL.md +0 -490
  36. EvoScientist/skills/lm-evaluation-harness/references/api-evaluation.md +0 -490
  37. EvoScientist/skills/lm-evaluation-harness/references/benchmark-guide.md +0 -488
  38. EvoScientist/skills/lm-evaluation-harness/references/custom-tasks.md +0 -602
  39. EvoScientist/skills/lm-evaluation-harness/references/distributed-eval.md +0 -519
  40. EvoScientist/skills/ml-paper-writing/SKILL.md +0 -937
  41. EvoScientist/skills/ml-paper-writing/references/checklists.md +0 -361
  42. EvoScientist/skills/ml-paper-writing/references/citation-workflow.md +0 -562
  43. EvoScientist/skills/ml-paper-writing/references/reviewer-guidelines.md +0 -367
  44. EvoScientist/skills/ml-paper-writing/references/sources.md +0 -159
  45. EvoScientist/skills/ml-paper-writing/references/writing-guide.md +0 -476
  46. EvoScientist/skills/ml-paper-writing/templates/README.md +0 -251
  47. EvoScientist/skills/ml-paper-writing/templates/aaai2026/README.md +0 -534
  48. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +0 -144
  49. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +0 -952
  50. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.bib +0 -111
  51. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.bst +0 -1493
  52. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.sty +0 -315
  53. EvoScientist/skills/ml-paper-writing/templates/acl/README.md +0 -50
  54. EvoScientist/skills/ml-paper-writing/templates/acl/acl.sty +0 -312
  55. EvoScientist/skills/ml-paper-writing/templates/acl/acl_latex.tex +0 -377
  56. EvoScientist/skills/ml-paper-writing/templates/acl/acl_lualatex.tex +0 -101
  57. EvoScientist/skills/ml-paper-writing/templates/acl/acl_natbib.bst +0 -1940
  58. EvoScientist/skills/ml-paper-writing/templates/acl/anthology.bib.txt +0 -26
  59. EvoScientist/skills/ml-paper-writing/templates/acl/custom.bib +0 -70
  60. EvoScientist/skills/ml-paper-writing/templates/acl/formatting.md +0 -326
  61. EvoScientist/skills/ml-paper-writing/templates/colm2025/README.md +0 -3
  62. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bib +0 -11
  63. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bst +0 -1440
  64. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  65. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.sty +0 -218
  66. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.tex +0 -305
  67. EvoScientist/skills/ml-paper-writing/templates/colm2025/fancyhdr.sty +0 -485
  68. EvoScientist/skills/ml-paper-writing/templates/colm2025/math_commands.tex +0 -508
  69. EvoScientist/skills/ml-paper-writing/templates/colm2025/natbib.sty +0 -1246
  70. EvoScientist/skills/ml-paper-writing/templates/iclr2026/fancyhdr.sty +0 -485
  71. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bib +0 -24
  72. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bst +0 -1440
  73. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  74. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.sty +0 -246
  75. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.tex +0 -414
  76. EvoScientist/skills/ml-paper-writing/templates/iclr2026/math_commands.tex +0 -508
  77. EvoScientist/skills/ml-paper-writing/templates/iclr2026/natbib.sty +0 -1246
  78. EvoScientist/skills/ml-paper-writing/templates/icml2026/algorithm.sty +0 -79
  79. EvoScientist/skills/ml-paper-writing/templates/icml2026/algorithmic.sty +0 -201
  80. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.bib +0 -75
  81. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.pdf +0 -0
  82. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.tex +0 -662
  83. EvoScientist/skills/ml-paper-writing/templates/icml2026/fancyhdr.sty +0 -864
  84. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml2026.bst +0 -1443
  85. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml2026.sty +0 -767
  86. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  87. EvoScientist/skills/ml-paper-writing/templates/neurips2025/Makefile +0 -36
  88. EvoScientist/skills/ml-paper-writing/templates/neurips2025/extra_pkgs.tex +0 -53
  89. EvoScientist/skills/ml-paper-writing/templates/neurips2025/main.tex +0 -38
  90. EvoScientist/skills/ml-paper-writing/templates/neurips2025/neurips.sty +0 -382
  91. EvoScientist/skills/peft/SKILL.md +0 -431
  92. EvoScientist/skills/peft/references/advanced-usage.md +0 -514
  93. EvoScientist/skills/peft/references/troubleshooting.md +0 -480
  94. EvoScientist/skills/ray-data/SKILL.md +0 -326
  95. EvoScientist/skills/ray-data/references/integration.md +0 -82
  96. EvoScientist/skills/ray-data/references/transformations.md +0 -83
  97. EvoScientist/skills/skill-creator/LICENSE.txt +0 -202
  98. EvoScientist/skills/skill-creator/SKILL.md +0 -356
  99. EvoScientist/skills/skill-creator/references/output-patterns.md +0 -82
  100. EvoScientist/skills/skill-creator/references/workflows.md +0 -28
  101. EvoScientist/skills/skill-creator/scripts/init_skill.py +0 -303
  102. EvoScientist/skills/skill-creator/scripts/package_skill.py +0 -110
  103. EvoScientist/skills/skill-creator/scripts/quick_validate.py +0 -95
  104. EvoScientist/skills_manager.py +0 -391
  105. EvoScientist/stream/display.py +0 -604
  106. EvoScientist/stream/events.py +0 -415
  107. EvoScientist/stream/state.py +0 -343
  108. evoscientist-0.0.1.dev4.dist-info/METADATA +0 -367
  109. evoscientist-0.0.1.dev4.dist-info/RECORD +0 -117
  110. evoscientist-0.0.1.dev4.dist-info/entry_points.txt +0 -5
  111. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc1.dist-info}/WHEEL +0 -0
  112. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc1.dist-info}/licenses/LICENSE +0 -0
  113. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc1.dist-info}/top_level.txt +0 -0
@@ -1,391 +0,0 @@
1
- """Skill installation and management for EvoScientist.
2
-
3
- This module provides functions for installing, listing, and uninstalling user skills.
4
- Skills are installed to USER_SKILLS_DIR (./workspace/skills/).
5
-
6
- Supported installation sources:
7
- - Local directory paths
8
- - GitHub URLs (https://github.com/owner/repo or .../tree/branch/path)
9
- - GitHub shorthand (owner/repo@skill-name)
10
-
11
- Usage:
12
- from EvoScientist.skills_manager import install_skill, list_skills, uninstall_skill
13
-
14
- # Install from local path
15
- install_skill("./my-skill")
16
-
17
- # Install from GitHub
18
- install_skill("https://github.com/user/repo/tree/main/my-skill")
19
-
20
- # List installed skills
21
- for skill in list_skills():
22
- print(skill["name"], skill["description"])
23
-
24
- # Uninstall a skill
25
- uninstall_skill("my-skill")
26
- """
27
-
28
- from __future__ import annotations
29
-
30
- import os
31
- import re
32
- import shutil
33
- import subprocess
34
- import tempfile
35
- from dataclasses import dataclass
36
- from pathlib import Path
37
-
38
- import yaml
39
-
40
- from .paths import USER_SKILLS_DIR
41
-
42
-
43
- @dataclass
44
- class SkillInfo:
45
- """Information about an installed skill."""
46
-
47
- name: str
48
- description: str
49
- path: Path
50
- source: str # "user" or "system"
51
-
52
-
53
- def _parse_skill_md(skill_md_path: Path) -> dict[str, str]:
54
- """Parse SKILL.md frontmatter to extract name and description.
55
-
56
- SKILL.md format:
57
- ---
58
- name: skill-name
59
- description: A brief description...
60
- ---
61
- # Skill Title
62
- ...
63
-
64
- Returns:
65
- Dictionary with 'name' and 'description' keys.
66
- """
67
- content = skill_md_path.read_text(encoding="utf-8")
68
-
69
- # Extract YAML frontmatter
70
- frontmatter_match = re.match(r"^---\s*\n(.*?)\n---", content, re.DOTALL)
71
- if not frontmatter_match:
72
- # No frontmatter, use directory name
73
- return {
74
- "name": skill_md_path.parent.name,
75
- "description": "(no description)",
76
- }
77
-
78
- try:
79
- frontmatter = yaml.safe_load(frontmatter_match.group(1))
80
- return {
81
- "name": frontmatter.get("name", skill_md_path.parent.name),
82
- "description": frontmatter.get("description", "(no description)"),
83
- }
84
- except yaml.YAMLError:
85
- return {
86
- "name": skill_md_path.parent.name,
87
- "description": "(invalid frontmatter)",
88
- }
89
-
90
-
91
- def _parse_github_url(url: str) -> tuple[str, str | None, str | None]:
92
- """Parse a GitHub URL into (repo, ref, path).
93
-
94
- Supports formats:
95
- https://github.com/owner/repo
96
- https://github.com/owner/repo/tree/main/path/to/skill
97
- github.com/owner/repo/tree/branch/path
98
- owner/repo@skill-name (shorthand from skills.sh)
99
-
100
- Returns:
101
- (repo, ref_or_none, path_or_none)
102
- """
103
- # Shorthand: owner/repo@path
104
- if "@" in url and "://" not in url:
105
- repo, path = url.split("@", 1)
106
- return repo.strip(), None, path.strip()
107
-
108
- # Strip protocol and github.com prefix
109
- cleaned = re.sub(r"^https?://", "", url)
110
- cleaned = re.sub(r"^github\.com/", "", cleaned)
111
- cleaned = cleaned.rstrip("/")
112
-
113
- # Match: owner/repo/tree/ref/path...
114
- m = re.match(r"^([^/]+/[^/]+)/tree/([^/]+)(?:/(.+))?$", cleaned)
115
- if m:
116
- return m.group(1), m.group(2), m.group(3)
117
-
118
- # Match: owner/repo (no tree)
119
- m = re.match(r"^([^/]+/[^/]+)$", cleaned)
120
- if m:
121
- return m.group(1), None, None
122
-
123
- raise ValueError(f"Cannot parse GitHub URL: {url}")
124
-
125
-
126
- def _clone_repo(repo: str, ref: str | None, dest: str) -> None:
127
- """Shallow-clone a GitHub repo."""
128
- clone_url = f"https://github.com/{repo}.git"
129
- cmd = ["git", "clone", "--depth", "1"]
130
- if ref:
131
- cmd += ["--branch", ref]
132
- cmd += [clone_url, dest]
133
-
134
- result = subprocess.run(cmd, capture_output=True, text=True)
135
- if result.returncode != 0:
136
- raise RuntimeError(f"git clone failed: {result.stderr.strip()}")
137
-
138
-
139
- def _is_github_url(source: str) -> bool:
140
- """Check if the source looks like a GitHub URL or shorthand."""
141
- if "github.com" in source.lower():
142
- return True
143
- if "://" in source:
144
- return False # Non-GitHub URL
145
- # Check for owner/repo@skill shorthand
146
- if "@" in source and "/" in source.split("@")[0]:
147
- return True
148
- # Check for owner/repo format (but not local paths like ./foo or /foo)
149
- if "/" in source and not source.startswith((".", "/")):
150
- parts = source.split("/")
151
- # GitHub shorthand: exactly 2 parts, both non-empty, no extensions
152
- if len(parts) == 2 and all(parts) and "." not in parts[0]:
153
- return True
154
- return False
155
-
156
-
157
- def _validate_skill_dir(path: Path) -> bool:
158
- """Check if a directory contains a valid skill (has SKILL.md)."""
159
- return (path / "SKILL.md").is_file()
160
-
161
-
162
- def install_skill(source: str, dest_dir: str | None = None) -> dict:
163
- """Install a skill from a local path or GitHub URL.
164
-
165
- Args:
166
- source: Local directory path or GitHub URL/shorthand.
167
- dest_dir: Destination directory (defaults to USER_SKILLS_DIR).
168
-
169
- Returns:
170
- Dictionary with installation result:
171
- - success: bool
172
- - name: skill name (if successful)
173
- - path: installed path (if successful)
174
- - error: error message (if failed)
175
- """
176
- dest_dir = dest_dir or str(USER_SKILLS_DIR)
177
- os.makedirs(dest_dir, exist_ok=True)
178
-
179
- if _is_github_url(source):
180
- return _install_from_github(source, dest_dir)
181
- else:
182
- return _install_from_local(source, dest_dir)
183
-
184
-
185
- def _install_from_local(source: str, dest_dir: str) -> dict:
186
- """Install a skill from a local directory path."""
187
- source_path = Path(source).expanduser().resolve()
188
-
189
- if not source_path.exists():
190
- return {"success": False, "error": f"Path does not exist: {source}"}
191
-
192
- if not source_path.is_dir():
193
- return {"success": False, "error": f"Not a directory: {source}"}
194
-
195
- if not _validate_skill_dir(source_path):
196
- return {"success": False, "error": f"No SKILL.md found in: {source}"}
197
-
198
- # Parse SKILL.md to get the skill name
199
- skill_info = _parse_skill_md(source_path / "SKILL.md")
200
- skill_name = skill_info["name"]
201
-
202
- # Destination path
203
- target_path = Path(dest_dir) / skill_name
204
-
205
- # Remove existing if present
206
- if target_path.exists():
207
- shutil.rmtree(target_path)
208
-
209
- # Copy skill directory
210
- shutil.copytree(source_path, target_path)
211
-
212
- return {
213
- "success": True,
214
- "name": skill_name,
215
- "path": str(target_path),
216
- "description": skill_info["description"],
217
- }
218
-
219
-
220
- def _install_from_github(source: str, dest_dir: str) -> dict:
221
- """Install a skill from a GitHub URL or shorthand."""
222
- try:
223
- repo, ref, path = _parse_github_url(source)
224
- except ValueError as e:
225
- return {"success": False, "error": str(e)}
226
-
227
- with tempfile.TemporaryDirectory(prefix="evoscientist-skill-") as tmp:
228
- clone_dir = os.path.join(tmp, "repo")
229
-
230
- try:
231
- _clone_repo(repo, ref, clone_dir)
232
- except RuntimeError as e:
233
- return {"success": False, "error": str(e)}
234
-
235
- # Determine the skill source directory
236
- if path:
237
- skill_source = Path(clone_dir) / path
238
- else:
239
- skill_source = Path(clone_dir)
240
-
241
- if not skill_source.exists():
242
- return {"success": False, "error": f"Path not found in repo: {path or '/'}"}
243
-
244
- if not _validate_skill_dir(skill_source):
245
- # Maybe the repo root contains multiple skills?
246
- if not path:
247
- # Try to find skills in repo root
248
- found_skills = []
249
- for entry in os.listdir(clone_dir):
250
- entry_path = Path(clone_dir) / entry
251
- if entry_path.is_dir() and _validate_skill_dir(entry_path):
252
- found_skills.append(entry)
253
-
254
- if found_skills:
255
- return {
256
- "success": False,
257
- "error": (
258
- f"Multiple skills found in repo. "
259
- f"Please specify one: {', '.join(found_skills)}"
260
- ),
261
- }
262
-
263
- return {"success": False, "error": f"No SKILL.md found in: {source}"}
264
-
265
- # Parse skill info and copy
266
- skill_info = _parse_skill_md(skill_source / "SKILL.md")
267
- skill_name = skill_info["name"]
268
- target_path = Path(dest_dir) / skill_name
269
-
270
- if target_path.exists():
271
- shutil.rmtree(target_path)
272
-
273
- # Copy, excluding .git directory
274
- def ignore_git(dir_name: str, files: list[str]) -> list[str]:
275
- return [f for f in files if f == ".git"]
276
-
277
- shutil.copytree(skill_source, target_path, ignore=ignore_git)
278
-
279
- return {
280
- "success": True,
281
- "name": skill_name,
282
- "path": str(target_path),
283
- "description": skill_info["description"],
284
- "source": source,
285
- }
286
-
287
-
288
- def list_skills(include_system: bool = False) -> list[SkillInfo]:
289
- """List all installed user skills.
290
-
291
- Args:
292
- include_system: If True, also include system (built-in) skills.
293
-
294
- Returns:
295
- List of SkillInfo objects for each installed skill.
296
- """
297
- skills: list[SkillInfo] = []
298
-
299
- # User skills
300
- user_dir = Path(USER_SKILLS_DIR)
301
- if user_dir.exists():
302
- for entry in sorted(user_dir.iterdir()):
303
- if entry.is_dir() and _validate_skill_dir(entry):
304
- skill_md = entry / "SKILL.md"
305
- info = _parse_skill_md(skill_md)
306
- skills.append(
307
- SkillInfo(
308
- name=info["name"],
309
- description=info["description"],
310
- path=entry,
311
- source="user",
312
- )
313
- )
314
-
315
- # System skills (optional)
316
- if include_system:
317
- from .EvoScientist import SKILLS_DIR
318
-
319
- system_dir = Path(SKILLS_DIR)
320
- if system_dir.exists():
321
- for entry in sorted(system_dir.iterdir()):
322
- if entry.is_dir() and _validate_skill_dir(entry):
323
- # Skip if user has overridden this skill
324
- if any(s.name == entry.name for s in skills):
325
- continue
326
- skill_md = entry / "SKILL.md"
327
- info = _parse_skill_md(skill_md)
328
- skills.append(
329
- SkillInfo(
330
- name=info["name"],
331
- description=info["description"],
332
- path=entry,
333
- source="system",
334
- )
335
- )
336
-
337
- return skills
338
-
339
-
340
- def uninstall_skill(name: str) -> dict:
341
- """Uninstall a user-installed skill.
342
-
343
- Args:
344
- name: Name of the skill to uninstall.
345
-
346
- Returns:
347
- Dictionary with result:
348
- - success: bool
349
- - error: error message (if failed)
350
- """
351
- user_dir = Path(USER_SKILLS_DIR)
352
- target_path = user_dir / name
353
-
354
- if not target_path.exists():
355
- # Try to find by directory name (in case name differs from dir name)
356
- found = None
357
- if user_dir.exists():
358
- for entry in user_dir.iterdir():
359
- if entry.is_dir() and _validate_skill_dir(entry):
360
- info = _parse_skill_md(entry / "SKILL.md")
361
- if info["name"] == name:
362
- found = entry
363
- break
364
-
365
- if not found:
366
- return {"success": False, "error": f"Skill not found: {name}"}
367
- target_path = found
368
-
369
- # Check if it's a user skill (not system)
370
- if not str(target_path).startswith(str(user_dir)):
371
- return {"success": False, "error": f"Cannot uninstall system skill: {name}"}
372
-
373
- # Remove the skill directory
374
- shutil.rmtree(target_path)
375
-
376
- return {"success": True, "name": name}
377
-
378
-
379
- def get_skill_info(name: str) -> SkillInfo | None:
380
- """Get information about a specific skill.
381
-
382
- Args:
383
- name: Name of the skill.
384
-
385
- Returns:
386
- SkillInfo if found, None otherwise.
387
- """
388
- for skill in list_skills(include_system=True):
389
- if skill.name == name:
390
- return skill
391
- return None