agentomics 1.1.0__tar.gz → 2.0.0__tar.gz
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.
- {agentomics-1.1.0/src/agentomics.egg-info → agentomics-2.0.0}/PKG-INFO +5 -3
- {agentomics-1.1.0 → agentomics-2.0.0}/README.md +1 -1
- {agentomics-1.1.0 → agentomics-2.0.0}/pyproject.toml +8 -2
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/check_dataset.py +3 -3
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/docker_utils.py +50 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/inference.py +23 -11
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/retrain.py +1 -5
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/run.py +12 -13
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/run_arguments.py +7 -6
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/create_datasets.py +3 -3
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/dataset_preparation.py +33 -115
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/datasets_interactive.py +8 -9
- agentomics-2.0.0/src/agentomics/datasets/label_processing.py +31 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/run_agent.py +27 -21
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/run_agent_interactive.py +17 -13
- agentomics-2.0.0/src/agentomics/runtime/archives.py +47 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/best_iteration_snapshot.py +1 -2
- agentomics-2.0.0/src/agentomics/runtime/collected_data_directory.py +121 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/conda_utils.py +36 -9
- agentomics-2.0.0/src/agentomics/runtime/data_collection_workflow.py +67 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/evaluate.py +7 -7
- agentomics-2.0.0/src/agentomics/runtime/evaluate_result.py +62 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/filesystem.py +56 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/generate_final_reports.py +21 -234
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/inference_workflow.py +5 -1
- agentomics-2.0.0/src/agentomics/runtime/iterations_lessons.py +130 -0
- agentomics-2.0.0/src/agentomics/runtime/plots_helpers.py +207 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/read_write_utils.py +3 -33
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/run_lifecycle.py +15 -7
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/run_workflow.py +4 -32
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/setup_fork.py +6 -7
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/step_outputs.py +2 -2
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/training_workflow.py +2 -1
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/config.py +38 -4
- agentomics-2.0.0/src/agentomics/utils/data_module_config.py +55 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/exceptions.py +10 -1
- agentomics-2.0.0/src/agentomics/utils/metrics.py +16 -0
- agentomics-2.0.0/src/agentomics/utils/metrics_interactive.py +32 -0
- agentomics-2.0.0/src/agentomics/utils/ml_tasks/__init__.py +22 -0
- agentomics-2.0.0/src/agentomics/utils/ml_tasks/base.py +104 -0
- agentomics-2.0.0/src/agentomics/utils/ml_tasks/classification.py +255 -0
- agentomics-2.0.0/src/agentomics/utils/ml_tasks/registry.py +37 -0
- agentomics-2.0.0/src/agentomics/utils/ml_tasks/regression.py +126 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/printing_utils.py +8 -8
- {agentomics-1.1.0 → agentomics-2.0.0/src/agentomics.egg-info}/PKG-INFO +5 -3
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics.egg-info/SOURCES.txt +11 -22
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics.egg-info/requires.txt +2 -0
- agentomics-1.1.0/src/agentomics/datasets/label_processing.py +0 -61
- agentomics-1.1.0/src/agentomics/runtime/evaluate_result.py +0 -103
- agentomics-1.1.0/src/agentomics/utils/metrics.py +0 -167
- agentomics-1.1.0/src/agentomics/utils/metrics_interactive.py +0 -63
- agentomics-1.1.0/src/agentomics/utils/task_types.py +0 -6
- agentomics-1.1.0/test/test_agent_permissions.py +0 -178
- agentomics-1.1.0/test/test_bash_lines_collapsing.py +0 -124
- agentomics-1.1.0/test/test_best_iteration_snapshot_and_splits.py +0 -631
- agentomics-1.1.0/test/test_codex_provider.py +0 -189
- agentomics-1.1.0/test/test_csv_converter.py +0 -114
- agentomics-1.1.0/test/test_dataset_extras_and_input_structure.py +0 -301
- agentomics-1.1.0/test/test_dataset_folder_split_contracts.py +0 -219
- agentomics-1.1.0/test/test_dataset_preparation_publishing.py +0 -110
- agentomics-1.1.0/test/test_environment_recreation.py +0 -523
- agentomics-1.1.0/test/test_forking.py +0 -493
- agentomics-1.1.0/test/test_gpu_access.py +0 -57
- agentomics-1.1.0/test/test_pr_title_validation.py +0 -85
- agentomics-1.1.0/test/test_pydantic_ai_validators.py +0 -75
- agentomics-1.1.0/test/test_release_please_configuration.py +0 -49
- agentomics-1.1.0/test/test_replace_tool.py +0 -210
- agentomics-1.1.0/test/test_retry_transport.py +0 -55
- agentomics-1.1.0/test/test_run_launcher_container_contract.py +0 -115
- agentomics-1.1.0/test/test_runtime_lifecycle.py +0 -243
- agentomics-1.1.0/test/test_transient_dataset_state.py +0 -154
- agentomics-1.1.0/test/test_utils.py +0 -114
- agentomics-1.1.0/test/test_version_identity.py +0 -50
- {agentomics-1.1.0 → agentomics-2.0.0}/LICENSE +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/setup.cfg +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/__init__.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/__init__.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/add_supplementary.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/cli/download_dataset.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/__init__.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/csv_converter.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/datasets/data_contract.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/__init__.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/git_checkpoints.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/inference_runner.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/iteration_reports.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/report_workflow.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/runtime/system_resources.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/README.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/ChemBERTa.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/DNABERT-2.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/ESM-2.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/HyenaDNA.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/MolFormerXL.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/NucleotideTransformer.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/NucleotideTransformerV2.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/supplementary_catalog/foundation_models/rinalmo.md +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/__init__.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/agent_id.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/api_keys.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/text_processing_utils.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/user_input.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics/utils/versioning.py +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics.egg-info/dependency_links.txt +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics.egg-info/entry_points.txt +0 -0
- {agentomics-1.1.0 → agentomics-2.0.0}/src/agentomics.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentomics
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Package for running Agentomics - an autonomous agentic system for ML model development
|
|
5
5
|
Author: Vlastimil Martinek
|
|
6
6
|
Maintainer-email: Vlastimil Martinek <martinekvlastimil95@gmail.com>
|
|
@@ -28,7 +28,7 @@ License: MIT License
|
|
|
28
28
|
|
|
29
29
|
Project-URL: Documentation, https://biogemt.github.io/agentomics-ml/
|
|
30
30
|
Project-URL: Repository, https://github.com/BioGeMT/Agentomics-ML
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.12
|
|
32
32
|
Description-Content-Type: text/markdown
|
|
33
33
|
License-File: LICENSE
|
|
34
34
|
Requires-Dist: genomic-benchmarks==1.0.0
|
|
@@ -39,11 +39,13 @@ Requires-Dist: Pillow==12.0.0
|
|
|
39
39
|
Requires-Dist: scikit-learn>=1.5
|
|
40
40
|
Requires-Dist: scipy>=1.11
|
|
41
41
|
Requires-Dist: rich>=14.0
|
|
42
|
+
Requires-Dist: pytest==9.1.1
|
|
43
|
+
Requires-Dist: pypdf>=6.0
|
|
42
44
|
Dynamic: license-file
|
|
43
45
|
|
|
44
46
|
# Agentomics
|
|
45
47
|
NEWS:
|
|
46
|
-
- *Agentomics
|
|
48
|
+
- *Agentomics has been presented at ISMB 2026 in Washington DC*
|
|
47
49
|
- *Agentomics has been published in Bioinformatics journal* [link to published paper](https://academic.oup.com/bioinformatics/article/42/Supplement_1/btag250/8726289)
|
|
48
50
|
- *Agentomics now supports any data type and supplementary material*
|
|
49
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agentomics
|
|
2
2
|
NEWS:
|
|
3
|
-
- *Agentomics
|
|
3
|
+
- *Agentomics has been presented at ISMB 2026 in Washington DC*
|
|
4
4
|
- *Agentomics has been published in Bioinformatics journal* [link to published paper](https://academic.oup.com/bioinformatics/article/42/Supplement_1/btag250/8726289)
|
|
5
5
|
- *Agentomics now supports any data type and supplementary material*
|
|
6
6
|
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agentomics"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
description = "Package for running Agentomics - an autonomous agentic system for ML model development"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
11
|
dependencies = [
|
|
12
12
|
"genomic-benchmarks==1.0.0",
|
|
13
13
|
"hrid>=0.3.0",
|
|
@@ -17,6 +17,8 @@ dependencies = [
|
|
|
17
17
|
"scikit-learn>=1.5",
|
|
18
18
|
"scipy>=1.11",
|
|
19
19
|
"rich>=14.0",
|
|
20
|
+
"pytest==9.1.1",
|
|
21
|
+
"pypdf>=6.0",
|
|
20
22
|
]
|
|
21
23
|
license = { file = "LICENSE" }
|
|
22
24
|
authors = [
|
|
@@ -38,6 +40,9 @@ agentomics-retrain = "agentomics.cli.retrain:main"
|
|
|
38
40
|
agentomics-check-dataset = "agentomics.cli.check_dataset:main"
|
|
39
41
|
agentomics-add-supplementary = "agentomics.cli.add_supplementary:main"
|
|
40
42
|
|
|
43
|
+
[tool.pytest.ini_options]
|
|
44
|
+
testpaths = ["tests"]
|
|
45
|
+
|
|
41
46
|
[tool.setuptools]
|
|
42
47
|
package-dir = {"" = "src"}
|
|
43
48
|
packages = [
|
|
@@ -46,6 +51,7 @@ packages = [
|
|
|
46
51
|
"agentomics.datasets",
|
|
47
52
|
"agentomics.runtime",
|
|
48
53
|
"agentomics.utils",
|
|
54
|
+
"agentomics.utils.ml_tasks",
|
|
49
55
|
]
|
|
50
56
|
|
|
51
57
|
[tool.setuptools.package-data]
|
|
@@ -37,7 +37,7 @@ def _suggested_metadata(summary: dict) -> dict:
|
|
|
37
37
|
"task_type",
|
|
38
38
|
"label_column",
|
|
39
39
|
"id_column",
|
|
40
|
-
"
|
|
40
|
+
"task_metadata",
|
|
41
41
|
)
|
|
42
42
|
return {
|
|
43
43
|
key: summary[key]
|
|
@@ -62,8 +62,8 @@ def _print_summary(summary: dict, interactive: bool) -> None:
|
|
|
62
62
|
if test_rows is not None:
|
|
63
63
|
console.print(f"Test rows: {test_rows}")
|
|
64
64
|
|
|
65
|
-
if "
|
|
66
|
-
console.print(f"
|
|
65
|
+
if summary.get("task_metadata"):
|
|
66
|
+
console.print(f"Task metadata: {summary['task_metadata']}")
|
|
67
67
|
console.print(f"Input structure: {summary.get('input_structure')}")
|
|
68
68
|
|
|
69
69
|
if interactive:
|
|
@@ -4,6 +4,7 @@ import argparse
|
|
|
4
4
|
import os
|
|
5
5
|
import shutil
|
|
6
6
|
import subprocess
|
|
7
|
+
import sys
|
|
7
8
|
from pathlib import Path
|
|
8
9
|
|
|
9
10
|
from agentomics.utils.versioning import get_version
|
|
@@ -13,6 +14,46 @@ DEFAULT_IMAGE = f"biogemt/agentomics:{get_version()}"
|
|
|
13
14
|
DEVELOPMENT_IMAGE = "agentomics:dev"
|
|
14
15
|
CONTAINER_PYTHON = "/opt/conda/envs/agentomics-env/bin/python"
|
|
15
16
|
|
|
17
|
+
PROXY_ENV_VAR_NAMES = (
|
|
18
|
+
"HTTP_PROXY",
|
|
19
|
+
"HTTPS_PROXY",
|
|
20
|
+
"ALL_PROXY",
|
|
21
|
+
"NO_PROXY"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def resolve_proxy_env_vars() -> dict[str, str]:
|
|
26
|
+
"""Resolve proxy variables from the environment and .env file."""
|
|
27
|
+
|
|
28
|
+
env_vars: dict[str, str] = {}
|
|
29
|
+
env_file_values: dict[str, str] = {}
|
|
30
|
+
env_file = Path.cwd() / ".env"
|
|
31
|
+
if env_file.is_file():
|
|
32
|
+
for line in env_file.read_text().splitlines():
|
|
33
|
+
line = line.strip()
|
|
34
|
+
if line and not line.startswith("#") and "=" in line:
|
|
35
|
+
name, value = line.split("=", 1)
|
|
36
|
+
env_file_values[name.strip()] = value.strip()
|
|
37
|
+
|
|
38
|
+
for upper_name in PROXY_ENV_VAR_NAMES:
|
|
39
|
+
lower_name = upper_name.lower()
|
|
40
|
+
value = (
|
|
41
|
+
os.environ.get(upper_name)
|
|
42
|
+
or os.environ.get(lower_name)
|
|
43
|
+
or env_file_values.get(upper_name)
|
|
44
|
+
or env_file_values.get(lower_name)
|
|
45
|
+
)
|
|
46
|
+
if value:
|
|
47
|
+
env_vars[upper_name] = value
|
|
48
|
+
env_vars[lower_name] = value
|
|
49
|
+
return env_vars
|
|
50
|
+
|
|
51
|
+
def _proxy_build_arguments() -> list[str]:
|
|
52
|
+
arguments: list[str] = []
|
|
53
|
+
for name, value in resolve_proxy_env_vars().items():
|
|
54
|
+
arguments.extend(["--build-arg", f"{name}={value}"])
|
|
55
|
+
return arguments
|
|
56
|
+
|
|
16
57
|
def create_parser(description: str) -> argparse.ArgumentParser:
|
|
17
58
|
parser = argparse.ArgumentParser(
|
|
18
59
|
description=description,
|
|
@@ -33,6 +74,14 @@ def create_parser(description: str) -> argparse.ArgumentParser:
|
|
|
33
74
|
return parser
|
|
34
75
|
|
|
35
76
|
def build_development_image() -> str:
|
|
77
|
+
try:
|
|
78
|
+
return _build_development_image()
|
|
79
|
+
except RuntimeError as error:
|
|
80
|
+
# These errors are user mistakes, so print only the message, without a traceback.
|
|
81
|
+
print(f"Error: {error}", file=sys.stderr)
|
|
82
|
+
sys.exit(1)
|
|
83
|
+
|
|
84
|
+
def _build_development_image() -> str:
|
|
36
85
|
if shutil.which("docker") is None:
|
|
37
86
|
raise RuntimeError("Missing required command: docker")
|
|
38
87
|
|
|
@@ -50,6 +99,7 @@ def build_development_image() -> str:
|
|
|
50
99
|
[
|
|
51
100
|
"docker",
|
|
52
101
|
"build",
|
|
102
|
+
*_proxy_build_arguments(),
|
|
53
103
|
"--build-arg",
|
|
54
104
|
"REPOSITORY_SOURCE=.",
|
|
55
105
|
"-t",
|
|
@@ -36,7 +36,15 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
36
36
|
default=Path(Config.BEST_ITERATION_SNAPSHOT_DIRNAME),
|
|
37
37
|
help="Iteration directory relative to --agent-dir",
|
|
38
38
|
)
|
|
39
|
-
parser.
|
|
39
|
+
artifacts_source_options = parser.add_mutually_exclusive_group()
|
|
40
|
+
artifacts_source_options.add_argument(
|
|
41
|
+
"--artifacts-dir", type=Path,
|
|
42
|
+
help=(
|
|
43
|
+
"Use these model artifacts instead of the selected iteration's original artifacts "
|
|
44
|
+
"(cannot be combined with --all-iterations)"
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
artifacts_source_options.add_argument(
|
|
40
48
|
"--all-iterations", action="store_true",
|
|
41
49
|
help="Run every archived iteration",
|
|
42
50
|
)
|
|
@@ -63,6 +71,16 @@ def _run_inference_with_resolved_paths(arguments: argparse.Namespace) -> int:
|
|
|
63
71
|
"--iteration-dir",
|
|
64
72
|
str(arguments.iteration_dir),
|
|
65
73
|
]
|
|
74
|
+
mounts = [
|
|
75
|
+
f"type=bind,src={arguments.agent_dir},dst=/agent,readonly",
|
|
76
|
+
f"type=bind,src={arguments.input_path},dst={container_input},readonly",
|
|
77
|
+
f"type=bind,src={arguments.output.parent},dst=/inference-output",
|
|
78
|
+
]
|
|
79
|
+
if arguments.artifacts_dir is not None:
|
|
80
|
+
mounts.append(
|
|
81
|
+
f"type=bind,src={arguments.artifacts_dir},dst=/inference-artifacts,readonly"
|
|
82
|
+
)
|
|
83
|
+
python_arguments.extend(["--artifacts-dir", "/inference-artifacts"])
|
|
66
84
|
if arguments.label_col:
|
|
67
85
|
python_arguments.extend(["--label-col", arguments.label_col])
|
|
68
86
|
if arguments.all_iterations:
|
|
@@ -75,11 +93,7 @@ def _run_inference_with_resolved_paths(arguments: argparse.Namespace) -> int:
|
|
|
75
93
|
return run_python_in_docker(
|
|
76
94
|
image=arguments.image,
|
|
77
95
|
cpu_only=arguments.cpu_only,
|
|
78
|
-
mounts=
|
|
79
|
-
f"type=bind,src={arguments.agent_dir},dst=/agent",
|
|
80
|
-
f"type=bind,src={arguments.input_path},dst={container_input},readonly",
|
|
81
|
-
f"type=bind,src={arguments.output.parent},dst=/inference-output",
|
|
82
|
-
],
|
|
96
|
+
mounts=mounts,
|
|
83
97
|
python_arguments=python_arguments,
|
|
84
98
|
docker_arguments=docker_environment_arguments(
|
|
85
99
|
"WANDB_API_KEY",
|
|
@@ -88,9 +102,11 @@ def _run_inference_with_resolved_paths(arguments: argparse.Namespace) -> int:
|
|
|
88
102
|
"HTTP_PROXY",
|
|
89
103
|
"HTTPS_PROXY",
|
|
90
104
|
"ALL_PROXY",
|
|
105
|
+
"NO_PROXY",
|
|
91
106
|
"http_proxy",
|
|
92
107
|
"https_proxy",
|
|
93
108
|
"all_proxy",
|
|
109
|
+
"no_proxy",
|
|
94
110
|
),
|
|
95
111
|
check=False,
|
|
96
112
|
)
|
|
@@ -99,11 +115,7 @@ def main() -> int:
|
|
|
99
115
|
arguments = build_parser().parse_args()
|
|
100
116
|
resolve_inference_paths(arguments)
|
|
101
117
|
if arguments.dev:
|
|
102
|
-
|
|
103
|
-
arguments.image = build_development_image()
|
|
104
|
-
except RuntimeError as error:
|
|
105
|
-
print(f"Error: {error}", file=sys.stderr)
|
|
106
|
-
return 1
|
|
118
|
+
arguments.image = build_development_image()
|
|
107
119
|
return _run_inference_with_resolved_paths(arguments)
|
|
108
120
|
|
|
109
121
|
if __name__ == "__main__":
|
|
@@ -69,11 +69,7 @@ def main() -> int:
|
|
|
69
69
|
arguments = build_parser().parse_args()
|
|
70
70
|
resolve_training_paths(arguments)
|
|
71
71
|
if arguments.dev:
|
|
72
|
-
|
|
73
|
-
arguments.image = build_development_image()
|
|
74
|
-
except RuntimeError as error:
|
|
75
|
-
print(f"Error: {error}", file=sys.stderr)
|
|
76
|
-
return 1
|
|
72
|
+
arguments.image = build_development_image()
|
|
77
73
|
_run_in_docker(arguments)
|
|
78
74
|
return 0
|
|
79
75
|
|
|
@@ -71,6 +71,7 @@ def _build_container_arguments(arguments: argparse.Namespace) -> list[str]:
|
|
|
71
71
|
for option, value in (
|
|
72
72
|
("--model", arguments.model),
|
|
73
73
|
("--iteration-plan-model", arguments.iteration_plan_model),
|
|
74
|
+
("--trace-analysis-model", arguments.trace_analysis_model),
|
|
74
75
|
("--provider", arguments.provider),
|
|
75
76
|
("--dataset", arguments.dataset),
|
|
76
77
|
("--task-type", arguments.task_type),
|
|
@@ -95,7 +96,6 @@ def _build_container_arguments(arguments: argparse.Namespace) -> list[str]:
|
|
|
95
96
|
workflow_arguments.extend(arguments.tags)
|
|
96
97
|
for option, enabled in (
|
|
97
98
|
("--use-provisioning-key", arguments.use_provisioning_key),
|
|
98
|
-
("--test", arguments.test),
|
|
99
99
|
("--cpu-only", arguments.cpu_only),
|
|
100
100
|
("--disable-training-reporting", arguments.disable_training_reporting),
|
|
101
101
|
("--list-models", arguments.list_models),
|
|
@@ -109,10 +109,12 @@ def _build_container_arguments(arguments: argparse.Namespace) -> list[str]:
|
|
|
109
109
|
def _docker_environment_arguments(agent_id: str) -> list[str]:
|
|
110
110
|
docker_arguments = docker_environment_arguments(
|
|
111
111
|
"OPENAI_API_KEY", "ANTHROPIC_API_KEY", "OPENROUTER_API_KEY",
|
|
112
|
+
"ASTA_API_KEY", "S2_API_KEY", "UNPAYWALL_EMAIL",
|
|
112
113
|
"PROVISIONING_OPENROUTER_API_KEY", "OLLAMA_BASE_URL",
|
|
113
114
|
"WANDB_API_KEY", "WANDB_PROJECT_NAME", "WANDB_ENTITY",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
115
|
+
"WANDB_RUN_GROUP", "WANDB_JOB_TYPE", "WANDB_NAME",
|
|
116
|
+
"HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "NO_PROXY",
|
|
117
|
+
"http_proxy", "https_proxy", "all_proxy", "no_proxy", "CUDA_VISIBLE_DEVICES",
|
|
116
118
|
)
|
|
117
119
|
docker_arguments.extend(["-e", f"AGENT_ID={agent_id}"])
|
|
118
120
|
if sys.stdin.isatty() and sys.stdout.isatty():
|
|
@@ -162,9 +164,10 @@ def _resolve_dataset(
|
|
|
162
164
|
return dataset_directory
|
|
163
165
|
|
|
164
166
|
|
|
165
|
-
def
|
|
167
|
+
def build_dataset_mounts(
|
|
166
168
|
dataset_directory: Path | None,
|
|
167
169
|
) -> list[str]:
|
|
170
|
+
"""Build Docker mounts exposing only allowlisted public dataset entries."""
|
|
168
171
|
mounts = [f"type=tmpfs,dst={CONTAINER_DATASETS_DIRECTORY}"]
|
|
169
172
|
if dataset_directory is None:
|
|
170
173
|
return mounts
|
|
@@ -258,6 +261,7 @@ def _run_inference_on_test_input(
|
|
|
258
261
|
),
|
|
259
262
|
label_col=None,
|
|
260
263
|
iteration_dir=Path(Config.BEST_ITERATION_SNAPSHOT_DIRNAME),
|
|
264
|
+
artifacts_dir=None,
|
|
261
265
|
all_iterations=False,
|
|
262
266
|
cpu_only=cpu_only,
|
|
263
267
|
wandb_prefix=test_input.name,
|
|
@@ -311,7 +315,7 @@ def _run_test_evaluation_in_docker(
|
|
|
311
315
|
destination_dir=prepared_directory,
|
|
312
316
|
task_type=metadata["task_type"],
|
|
313
317
|
input_structure=metadata["input_structure"],
|
|
314
|
-
|
|
318
|
+
task_metadata=metadata["task_metadata"],
|
|
315
319
|
label_column=metadata.get("label_column"),
|
|
316
320
|
id_column=metadata.get("id_column"),
|
|
317
321
|
)
|
|
@@ -355,8 +359,7 @@ def _run_reporting_in_docker(
|
|
|
355
359
|
def _is_agent_run(arguments: argparse.Namespace) -> bool:
|
|
356
360
|
# TODO: Replace this implicit check with explicit command modes.
|
|
357
361
|
return not (
|
|
358
|
-
arguments.
|
|
359
|
-
or arguments.list_models
|
|
362
|
+
arguments.list_models
|
|
360
363
|
or arguments.list_datasets
|
|
361
364
|
or arguments.list_metrics
|
|
362
365
|
)
|
|
@@ -383,11 +386,7 @@ def main() -> int:
|
|
|
383
386
|
agent_id = create_agent_id()
|
|
384
387
|
|
|
385
388
|
if arguments.dev:
|
|
386
|
-
|
|
387
|
-
arguments.image = build_development_image()
|
|
388
|
-
except RuntimeError as error:
|
|
389
|
-
print(f"Error: {error}", file=sys.stderr)
|
|
390
|
-
return 1
|
|
389
|
+
arguments.image = build_development_image()
|
|
391
390
|
|
|
392
391
|
if not arguments.cpu_only:
|
|
393
392
|
try:
|
|
@@ -397,7 +396,7 @@ def main() -> int:
|
|
|
397
396
|
return 1
|
|
398
397
|
|
|
399
398
|
workspace_directory = _resolve_workspace(arguments.workspace_dir, agent_id)
|
|
400
|
-
dataset_mounts =
|
|
399
|
+
dataset_mounts = build_dataset_mounts(dataset_directory)
|
|
401
400
|
try:
|
|
402
401
|
exit_code = _run_agent_in_docker(
|
|
403
402
|
arguments,
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
+
from agentomics.utils.ml_tasks import get_task_names
|
|
7
|
+
|
|
6
8
|
|
|
7
9
|
def add_run_arguments(parser: argparse.ArgumentParser) -> None:
|
|
8
10
|
run_arguments = parser.add_argument_group("run configuration")
|
|
@@ -14,6 +16,10 @@ def add_run_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
14
16
|
"--iteration-plan-model",
|
|
15
17
|
help="LLM model used to generate the iteration plan; defaults to --model",
|
|
16
18
|
)
|
|
19
|
+
run_arguments.add_argument(
|
|
20
|
+
"--trace-analysis-model",
|
|
21
|
+
help="LLM model used to extract iterations lessons from step traces; defaults to --iteration-plan-model",
|
|
22
|
+
)
|
|
17
23
|
run_arguments.add_argument(
|
|
18
24
|
"--provider",
|
|
19
25
|
help="Provider override when multiple API-key providers are configured",
|
|
@@ -27,7 +33,7 @@ def add_run_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
27
33
|
)
|
|
28
34
|
run_arguments.add_argument(
|
|
29
35
|
"--task-type",
|
|
30
|
-
choices=(
|
|
36
|
+
choices=get_task_names(),
|
|
31
37
|
help=(
|
|
32
38
|
"Task type used to prepare the selected dataset; when omitted, use "
|
|
33
39
|
"dataset metadata or prompt interactively"
|
|
@@ -138,11 +144,6 @@ def add_run_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
138
144
|
default=10,
|
|
139
145
|
help="Spend limit for the temporary OpenRouter key",
|
|
140
146
|
)
|
|
141
|
-
operational_arguments.add_argument(
|
|
142
|
-
"--test",
|
|
143
|
-
action="store_true",
|
|
144
|
-
help="Run the project's integrated test suite instead of an agent run",
|
|
145
|
-
)
|
|
146
147
|
operational_arguments.add_argument(
|
|
147
148
|
"--cpu-only",
|
|
148
149
|
action="store_true",
|
|
@@ -17,6 +17,7 @@ from agentomics.datasets.data_contract import (
|
|
|
17
17
|
TEST_SPLIT_PREFIX,
|
|
18
18
|
TRAIN_SPLIT,
|
|
19
19
|
)
|
|
20
|
+
from agentomics.runtime.filesystem import write_atomically
|
|
20
21
|
|
|
21
22
|
REPO_PATH = Path.cwd()
|
|
22
23
|
FREE_SPOKEN_DIGIT_DATASET_VERSION = "v1.0.10"
|
|
@@ -251,9 +252,8 @@ def generate_spoken_digits_files(_dataset_name: str = "spoken_digits") -> None:
|
|
|
251
252
|
)
|
|
252
253
|
|
|
253
254
|
if not archive_path.exists():
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
temp_archive_path.replace(archive_path)
|
|
255
|
+
with write_atomically(archive_path) as temp_archive_path:
|
|
256
|
+
urllib.request.urlretrieve(source_url, temp_archive_path)
|
|
257
257
|
|
|
258
258
|
recordings_dirs = sorted(download_dir.glob("free-spoken-digit-dataset-*/recordings"))
|
|
259
259
|
if not recordings_dirs:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import math
|
|
3
2
|
import shutil
|
|
4
3
|
import sys
|
|
5
4
|
import tempfile
|
|
@@ -11,7 +10,6 @@ from rich.console import Console
|
|
|
11
10
|
from agentomics.datasets.data_contract import (
|
|
12
11
|
DATASET_DESCRIPTION_FILE_NAME,
|
|
13
12
|
INPUT_DIR_NAME,
|
|
14
|
-
LABEL_COLUMN_NAME,
|
|
15
13
|
LABELS_FILE_NAME,
|
|
16
14
|
METADATA_FILE_NAME,
|
|
17
15
|
NON_TEST_SPLIT_NAMES,
|
|
@@ -36,13 +34,10 @@ from agentomics.datasets.datasets_interactive import (
|
|
|
36
34
|
select_task_type,
|
|
37
35
|
)
|
|
38
36
|
from agentomics.datasets.label_processing import (
|
|
39
|
-
convert_classification_labels,
|
|
40
|
-
convert_regression_labels,
|
|
41
37
|
load_split_label_dfs,
|
|
42
|
-
validate_single_label_classification,
|
|
43
38
|
)
|
|
44
39
|
from agentomics.runtime.filesystem import create_absolute_symlink, find_symlinks_in_dir
|
|
45
|
-
from agentomics.utils.
|
|
40
|
+
from agentomics.utils.ml_tasks import MLTask, get_task
|
|
46
41
|
|
|
47
42
|
console = Console()
|
|
48
43
|
|
|
@@ -54,58 +49,13 @@ def _reject_symlinks_in_dir(directory: Path) -> None:
|
|
|
54
49
|
f"{len(symlinks)} symlink(s) found (e.g. {symlinks[0]})."
|
|
55
50
|
)
|
|
56
51
|
|
|
57
|
-
def
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# If every label is numeric-looking, sort by value: "1", "2", "10".
|
|
61
|
-
# If any label is non-numeric, keep the whole set lexicographic.
|
|
62
|
-
try:
|
|
63
|
-
numeric_values = [float(label.strip()) for label in string_labels]
|
|
64
|
-
all_labels_are_numeric = all(math.isfinite(value) for value in numeric_values)
|
|
65
|
-
except ValueError:
|
|
66
|
-
all_labels_are_numeric = False
|
|
67
|
-
|
|
68
|
-
if all_labels_are_numeric:
|
|
69
|
-
return sorted(string_labels, key=lambda label: float(label.strip()))
|
|
70
|
-
return sorted(string_labels)
|
|
71
|
-
|
|
72
|
-
def _resolve_task_type(source_metadata: dict, cli_task_type: str | None, train_labels: pd.DataFrame, interactive: bool) -> str:
|
|
52
|
+
def _resolve_task(
|
|
53
|
+
source_metadata: dict, cli_task_type: str | None, train_labels: pd.DataFrame, interactive: bool,
|
|
54
|
+
) -> MLTask:
|
|
73
55
|
resolved = cli_task_type or source_metadata.get("task_type")
|
|
74
56
|
if resolved is None:
|
|
75
57
|
resolved = select_task_type(train_labels, interactive=interactive)
|
|
76
|
-
|
|
77
|
-
raise ValueError(f"Invalid task_type '{resolved}'. Must be one of: {TaskTypes}")
|
|
78
|
-
return resolved
|
|
79
|
-
|
|
80
|
-
def _build_binary_label_mapping(
|
|
81
|
-
source_metadata: dict,
|
|
82
|
-
cli_positive_class: str | None,
|
|
83
|
-
cli_negative_class: str | None,
|
|
84
|
-
unique_labels,
|
|
85
|
-
interactive: bool,
|
|
86
|
-
) -> dict[str, int]:
|
|
87
|
-
resolved_positive = cli_positive_class if cli_positive_class is not None else source_metadata.get("positive_class")
|
|
88
|
-
resolved_negative = cli_negative_class if cli_negative_class is not None else source_metadata.get("negative_class")
|
|
89
|
-
has_positive = resolved_positive is not None
|
|
90
|
-
has_negative = resolved_negative is not None
|
|
91
|
-
if has_positive != has_negative:
|
|
92
|
-
raise ValueError("Provide both positive_class and negative_class, or neither.")
|
|
93
|
-
if not has_positive:
|
|
94
|
-
if interactive and sys.stdin.isatty():
|
|
95
|
-
resolved_positive = select_positive_class(unique_labels)
|
|
96
|
-
resolved_negative = next(str(label) for label in unique_labels if str(label) != str(resolved_positive))
|
|
97
|
-
else:
|
|
98
|
-
sorted_labels = _sort_class_labels(unique_labels)
|
|
99
|
-
resolved_negative = sorted_labels[0]
|
|
100
|
-
resolved_positive = sorted_labels[1]
|
|
101
|
-
label_set = {str(label) for label in unique_labels}
|
|
102
|
-
resolved_set = {str(resolved_positive), str(resolved_negative)}
|
|
103
|
-
if resolved_set != label_set:
|
|
104
|
-
raise ValueError(
|
|
105
|
-
f"positive_class and negative_class must match the observed labels. "
|
|
106
|
-
f"Observed: {sorted(label_set)}; requested: {sorted(resolved_set)}"
|
|
107
|
-
)
|
|
108
|
-
return {str(resolved_negative): 0, str(resolved_positive): 1}
|
|
58
|
+
return get_task(resolved)
|
|
109
59
|
|
|
110
60
|
def _build_output_metadata(
|
|
111
61
|
source_metadata: dict,
|
|
@@ -131,14 +81,19 @@ def prepare_dataset(
|
|
|
131
81
|
positive_class=None,
|
|
132
82
|
negative_class=None,
|
|
133
83
|
interactive=False,
|
|
134
|
-
|
|
84
|
+
task_metadata: dict | None = None,
|
|
135
85
|
label_column=None,
|
|
86
|
+
*,
|
|
87
|
+
fit: bool = True,
|
|
136
88
|
) -> dict:
|
|
137
89
|
"""Prepare a dataset from source_dir into destination_dir.
|
|
138
90
|
|
|
139
91
|
Reads from source_dir (never modified), writes the prepared result to
|
|
140
92
|
destination_dir (input dirs are symlinked, labels are converted, metadata
|
|
141
93
|
is written). Returns the output metadata dict.
|
|
94
|
+
|
|
95
|
+
Use fit=False to reuse the saved task metadata without fitting a new
|
|
96
|
+
label encoding.
|
|
142
97
|
"""
|
|
143
98
|
source_dir = Path(source_dir)
|
|
144
99
|
destination_dir = Path(destination_dir)
|
|
@@ -176,47 +131,23 @@ def prepare_dataset(
|
|
|
176
131
|
input_structure = record_input_dir_structure(source_splits[TRAIN_SPLIT] / INPUT_DIR_NAME)
|
|
177
132
|
split_labels = load_split_label_dfs(source_splits)
|
|
178
133
|
|
|
179
|
-
|
|
134
|
+
task = _resolve_task(source_metadata, task_type, split_labels[TRAIN_SPLIT], interactive)
|
|
180
135
|
output_metadata = _build_output_metadata(
|
|
181
|
-
source_metadata,
|
|
136
|
+
source_metadata, task.name, split_labels, input_structure,
|
|
182
137
|
)
|
|
183
138
|
|
|
184
|
-
if
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if len(unique_labels) == 2 or has_cli_class_override:
|
|
197
|
-
label_to_scalar = _build_binary_label_mapping(
|
|
198
|
-
source_metadata,
|
|
199
|
-
positive_class,
|
|
200
|
-
negative_class,
|
|
201
|
-
unique_labels,
|
|
202
|
-
interactive,
|
|
203
|
-
)
|
|
204
|
-
else:
|
|
205
|
-
sorted_labels = _sort_class_labels(unique_labels)
|
|
206
|
-
label_to_scalar = {str(label): index for index, label in enumerate(sorted_labels)}
|
|
207
|
-
console.print(f"INFO: Label to number mapping: {label_to_scalar}. If this is wrong, please provide --positive-class and --negative-class parameters to the script.")
|
|
208
|
-
output_metadata["label_to_scalar"] = label_to_scalar
|
|
209
|
-
numeric_split_labels = {
|
|
210
|
-
split_name: convert_classification_labels(labels, label_to_scalar, split_name)
|
|
211
|
-
for split_name, labels in split_labels.items()
|
|
212
|
-
}
|
|
213
|
-
elif resolved_task_type == TaskTypes.REGRESSION:
|
|
214
|
-
numeric_split_labels = {
|
|
215
|
-
split_name: convert_regression_labels(labels, split_name)
|
|
216
|
-
for split_name, labels in split_labels.items()
|
|
217
|
-
}
|
|
218
|
-
else:
|
|
219
|
-
raise ValueError(f"Unknown task_type: {resolved_task_type}. Expected one of {TaskTypes}.")
|
|
139
|
+
if task_metadata is None:
|
|
140
|
+
task_metadata = source_metadata.get("task_metadata", {})
|
|
141
|
+
numeric_split_labels, label_metadata = task.validate_and_numericalize_labels(
|
|
142
|
+
split_labels, task_metadata, fit=fit,
|
|
143
|
+
options={
|
|
144
|
+
"source_metadata": source_metadata,
|
|
145
|
+
"positive_class": positive_class,
|
|
146
|
+
"negative_class": negative_class,
|
|
147
|
+
"positive_class_selector": select_positive_class if interactive and sys.stdin.isatty() else None,
|
|
148
|
+
},
|
|
149
|
+
)
|
|
150
|
+
output_metadata["task_metadata"] = label_metadata
|
|
220
151
|
|
|
221
152
|
destination_dir.mkdir(parents=True, exist_ok=True)
|
|
222
153
|
destination_splits = {}
|
|
@@ -277,7 +208,7 @@ def check_dataset(source_dir: Path, interactive: bool = False) -> dict:
|
|
|
277
208
|
destination_dir=temporary_root / "prepared_test",
|
|
278
209
|
task_type=metadata["task_type"],
|
|
279
210
|
input_structure=metadata["input_structure"],
|
|
280
|
-
|
|
211
|
+
task_metadata=metadata["task_metadata"],
|
|
281
212
|
label_column=metadata.get("label_column"),
|
|
282
213
|
id_column=metadata.get("id_column"),
|
|
283
214
|
)
|
|
@@ -301,7 +232,7 @@ def prepare_test_dataset(
|
|
|
301
232
|
destination_dir: Path,
|
|
302
233
|
task_type: str,
|
|
303
234
|
input_structure: list[str],
|
|
304
|
-
|
|
235
|
+
task_metadata: dict | None = None,
|
|
305
236
|
label_column: str | None = None,
|
|
306
237
|
id_column: str | None = None,
|
|
307
238
|
) -> dict:
|
|
@@ -311,6 +242,7 @@ def prepare_test_dataset(
|
|
|
311
242
|
destination_dir (input dir is symlinked, labels are converted, metadata
|
|
312
243
|
is written). Returns the output metadata dict.
|
|
313
244
|
"""
|
|
245
|
+
task = get_task(task_type)
|
|
314
246
|
source_dir = Path(source_dir)
|
|
315
247
|
destination_dir = Path(destination_dir)
|
|
316
248
|
|
|
@@ -332,23 +264,10 @@ def prepare_test_dataset(
|
|
|
332
264
|
|
|
333
265
|
test_labels = load_split_label_dfs({TEST_SPLIT_PREFIX: test_source})
|
|
334
266
|
|
|
335
|
-
|
|
336
|
-
if not
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
label_to_scalar = {str(k): int(v) for k, v in label_to_scalar.items()}
|
|
340
|
-
actual_labels = set(test_labels[TEST_SPLIT_PREFIX][LABEL_COLUMN_NAME].astype(str).unique())
|
|
341
|
-
unknown_labels = sorted(actual_labels - set(label_to_scalar))
|
|
342
|
-
if unknown_labels:
|
|
343
|
-
raise ValueError(
|
|
344
|
-
f"Test split contains labels not present in train: {unknown_labels}. "
|
|
345
|
-
f"Known labels: {sorted(label_to_scalar)}"
|
|
346
|
-
)
|
|
347
|
-
numeric_labels = convert_classification_labels(test_labels[TEST_SPLIT_PREFIX], label_to_scalar, TEST_SPLIT_PREFIX)
|
|
348
|
-
elif task_type == TaskTypes.REGRESSION:
|
|
349
|
-
numeric_labels = convert_regression_labels(test_labels[TEST_SPLIT_PREFIX], TEST_SPLIT_PREFIX)
|
|
350
|
-
else:
|
|
351
|
-
raise ValueError(f"Unknown task_type: {task_type}. Expected one of {TaskTypes}.")
|
|
267
|
+
numeric_test_labels, label_metadata = task.validate_and_numericalize_labels(
|
|
268
|
+
test_labels, task_metadata if task_metadata is not None else {},
|
|
269
|
+
)
|
|
270
|
+
numeric_labels = numeric_test_labels[TEST_SPLIT_PREFIX]
|
|
352
271
|
|
|
353
272
|
dest_test = destination_dir / TEST_SPLIT_PREFIX
|
|
354
273
|
dest_test.mkdir(parents=True, exist_ok=True)
|
|
@@ -370,8 +289,7 @@ def prepare_test_dataset(
|
|
|
370
289
|
"input_structure": input_structure,
|
|
371
290
|
"prepared": True,
|
|
372
291
|
}
|
|
373
|
-
|
|
374
|
-
test_metadata["label_to_scalar"] = label_to_scalar
|
|
292
|
+
test_metadata["task_metadata"] = label_metadata
|
|
375
293
|
(destination_dir / METADATA_FILE_NAME).write_text(json.dumps(test_metadata, indent=4), encoding="utf-8")
|
|
376
294
|
|
|
377
295
|
return test_metadata
|