inferyard 0.0.1__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.
- inferyard-0.0.1/.gitignore +31 -0
- inferyard-0.0.1/LICENSE +21 -0
- inferyard-0.0.1/PKG-INFO +98 -0
- inferyard-0.0.1/README.md +82 -0
- inferyard-0.0.1/docs/installation.md +185 -0
- inferyard-0.0.1/pyproject.toml +81 -0
- inferyard-0.0.1/src/inferyard/__init__.py +4 -0
- inferyard-0.0.1/src/inferyard/__main__.py +3 -0
- inferyard-0.0.1/src/inferyard/adapters/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/adapters/engine_fit.py +430 -0
- inferyard-0.0.1/src/inferyard/adapters/engine_fit_common.py +96 -0
- inferyard-0.0.1/src/inferyard/adapters/kvmem.py +7 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_adapter.py +317 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_generation.py +298 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_observation.py +288 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_observation_json.py +108 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_parameters.py +200 -0
- inferyard-0.0.1/src/inferyard/adapters/lab_transport.py +94 -0
- inferyard-0.0.1/src/inferyard/adapters/llama_cpp.py +44 -0
- inferyard-0.0.1/src/inferyard/adapters/native_observation.py +187 -0
- inferyard-0.0.1/src/inferyard/adapters/ninfer.py +7 -0
- inferyard-0.0.1/src/inferyard/adapters/prism.py +468 -0
- inferyard-0.0.1/src/inferyard/adapters/requests.py +14 -0
- inferyard-0.0.1/src/inferyard/adapters/response_state.py +36 -0
- inferyard-0.0.1/src/inferyard/analysis/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/analysis/aggregate.py +30 -0
- inferyard-0.0.1/src/inferyard/analysis/block_overhead.py +167 -0
- inferyard-0.0.1/src/inferyard/analysis/boundary_environment.py +130 -0
- inferyard-0.0.1/src/inferyard/analysis/cache_comparison.py +54 -0
- inferyard-0.0.1/src/inferyard/analysis/cache_observations.py +113 -0
- inferyard-0.0.1/src/inferyard/analysis/candidate_filter.py +247 -0
- inferyard-0.0.1/src/inferyard/analysis/comparison.py +395 -0
- inferyard-0.0.1/src/inferyard/analysis/comparison_helpers.py +38 -0
- inferyard-0.0.1/src/inferyard/analysis/duration_windows.py +96 -0
- inferyard-0.0.1/src/inferyard/analysis/engine_overhead.py +132 -0
- inferyard-0.0.1/src/inferyard/analysis/engine_timing.py +82 -0
- inferyard-0.0.1/src/inferyard/analysis/environment.py +213 -0
- inferyard-0.0.1/src/inferyard/analysis/environment_identity.py +32 -0
- inferyard-0.0.1/src/inferyard/analysis/first_event_overhead.py +75 -0
- inferyard-0.0.1/src/inferyard/analysis/idle_rss.py +103 -0
- inferyard-0.0.1/src/inferyard/analysis/input_lengths.py +178 -0
- inferyard-0.0.1/src/inferyard/analysis/length_outcomes.py +46 -0
- inferyard-0.0.1/src/inferyard/analysis/length_resources.py +69 -0
- inferyard-0.0.1/src/inferyard/analysis/observations.py +289 -0
- inferyard-0.0.1/src/inferyard/analysis/observed_comparison.py +148 -0
- inferyard-0.0.1/src/inferyard/analysis/output_budget.py +145 -0
- inferyard-0.0.1/src/inferyard/analysis/overhead_environment.py +102 -0
- inferyard-0.0.1/src/inferyard/analysis/performance.py +121 -0
- inferyard-0.0.1/src/inferyard/analysis/performance_comparison.py +287 -0
- inferyard-0.0.1/src/inferyard/analysis/position.py +164 -0
- inferyard-0.0.1/src/inferyard/analysis/public_metrics.py +95 -0
- inferyard-0.0.1/src/inferyard/analysis/public_metrics_check.py +91 -0
- inferyard-0.0.1/src/inferyard/analysis/quality.py +139 -0
- inferyard-0.0.1/src/inferyard/analysis/quantization_comparison.py +98 -0
- inferyard-0.0.1/src/inferyard/analysis/repetition_analysis.py +141 -0
- inferyard-0.0.1/src/inferyard/analysis/repetition_metrics.py +134 -0
- inferyard-0.0.1/src/inferyard/analysis/resource_comparison.py +258 -0
- inferyard-0.0.1/src/inferyard/analysis/resource_constraints.py +100 -0
- inferyard-0.0.1/src/inferyard/analysis/resource_metrics.py +183 -0
- inferyard-0.0.1/src/inferyard/analysis/resource_observations.py +61 -0
- inferyard-0.0.1/src/inferyard/analysis/scoring.py +295 -0
- inferyard-0.0.1/src/inferyard/analysis/scoring_revision.py +57 -0
- inferyard-0.0.1/src/inferyard/analysis/scoring_rules.py +111 -0
- inferyard-0.0.1/src/inferyard/analysis/sensor_observations.py +77 -0
- inferyard-0.0.1/src/inferyard/analysis/stability_observations.py +62 -0
- inferyard-0.0.1/src/inferyard/application/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/application/community.py +36 -0
- inferyard-0.0.1/src/inferyard/application/dispatch.py +143 -0
- inferyard-0.0.1/src/inferyard/application/engine_fit.py +68 -0
- inferyard-0.0.1/src/inferyard/application/overhead.py +69 -0
- inferyard-0.0.1/src/inferyard/application/raw_verification.py +113 -0
- inferyard-0.0.1/src/inferyard/application/types.py +116 -0
- inferyard-0.0.1/src/inferyard/application/verification.py +212 -0
- inferyard-0.0.1/src/inferyard/cli/__init__.py +45 -0
- inferyard-0.0.1/src/inferyard/cli/arguments.py +84 -0
- inferyard-0.0.1/src/inferyard/cli/commands/__init__.py +6 -0
- inferyard-0.0.1/src/inferyard/cli/commands/candidates.py +11 -0
- inferyard-0.0.1/src/inferyard/cli/commands/community.py +60 -0
- inferyard-0.0.1/src/inferyard/cli/commands/comparison.py +22 -0
- inferyard-0.0.1/src/inferyard/cli/commands/discovery.py +42 -0
- inferyard-0.0.1/src/inferyard/cli/commands/engine_fit.py +65 -0
- inferyard-0.0.1/src/inferyard/cli/commands/execution.py +36 -0
- inferyard-0.0.1/src/inferyard/cli/commands/exports.py +17 -0
- inferyard-0.0.1/src/inferyard/cli/commands/extensions.py +33 -0
- inferyard-0.0.1/src/inferyard/cli/commands/length.py +14 -0
- inferyard-0.0.1/src/inferyard/cli/commands/overhead.py +33 -0
- inferyard-0.0.1/src/inferyard/cli/commands/public.py +44 -0
- inferyard-0.0.1/src/inferyard/cli/commands/repetition.py +15 -0
- inferyard-0.0.1/src/inferyard/cli/commands/reporting.py +22 -0
- inferyard-0.0.1/src/inferyard/cli/commands/scoring.py +18 -0
- inferyard-0.0.1/src/inferyard/cli/commands/verification.py +13 -0
- inferyard-0.0.1/src/inferyard/cli/device_output.py +139 -0
- inferyard-0.0.1/src/inferyard/cli/entrypoint.py +125 -0
- inferyard-0.0.1/src/inferyard/cli/metadata.py +42 -0
- inferyard-0.0.1/src/inferyard/cli/request.py +81 -0
- inferyard-0.0.1/src/inferyard/config/__init__.py +17 -0
- inferyard-0.0.1/src/inferyard/config/bundle.py +125 -0
- inferyard-0.0.1/src/inferyard/config/bundle_review.py +140 -0
- inferyard-0.0.1/src/inferyard/config/cache_execution.py +29 -0
- inferyard-0.0.1/src/inferyard/config/cache_policy.py +19 -0
- inferyard-0.0.1/src/inferyard/config/community_assets.py +78 -0
- inferyard-0.0.1/src/inferyard/config/community_candidates.py +187 -0
- inferyard-0.0.1/src/inferyard/config/community_candidates_macos.py +123 -0
- inferyard-0.0.1/src/inferyard/config/community_candidates_windows.py +132 -0
- inferyard-0.0.1/src/inferyard/config/community_resources.py +22 -0
- inferyard-0.0.1/src/inferyard/config/community_workspace.py +49 -0
- inferyard-0.0.1/src/inferyard/config/engine_fit.py +291 -0
- inferyard-0.0.1/src/inferyard/config/engine_fit_assets.py +65 -0
- inferyard-0.0.1/src/inferyard/config/engine_fit_capabilities.py +62 -0
- inferyard-0.0.1/src/inferyard/config/engine_fit_native_sources.py +19 -0
- inferyard-0.0.1/src/inferyard/config/environment_binding.py +73 -0
- inferyard-0.0.1/src/inferyard/config/fixed_output.py +28 -0
- inferyard-0.0.1/src/inferyard/config/lineage_records.py +50 -0
- inferyard-0.0.1/src/inferyard/config/loader.py +163 -0
- inferyard-0.0.1/src/inferyard/config/model_lineage.py +20 -0
- inferyard-0.0.1/src/inferyard/config/plan_inputs.py +201 -0
- inferyard-0.0.1/src/inferyard/config/plan_math.py +25 -0
- inferyard-0.0.1/src/inferyard/config/planning.py +177 -0
- inferyard-0.0.1/src/inferyard/config/preparation_io.py +172 -0
- inferyard-0.0.1/src/inferyard/config/public_config_check.py +79 -0
- inferyard-0.0.1/src/inferyard/config/public_plan.py +141 -0
- inferyard-0.0.1/src/inferyard/config/public_recipe.py +159 -0
- inferyard-0.0.1/src/inferyard/config/service_binding.py +79 -0
- inferyard-0.0.1/src/inferyard/config/single_plan.py +74 -0
- inferyard-0.0.1/src/inferyard/config/startup_portability.py +65 -0
- inferyard-0.0.1/src/inferyard/config/toml_writer.py +43 -0
- inferyard-0.0.1/src/inferyard/contracts/__init__.py +19 -0
- inferyard-0.0.1/src/inferyard/contracts/contracts_experiment.py +272 -0
- inferyard-0.0.1/src/inferyard/contracts/contracts_storage.py +251 -0
- inferyard-0.0.1/src/inferyard/contracts/lab.py +196 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas.py +74 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_common.py +40 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_config.py +213 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_events.py +213 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_experiment.py +271 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_extensions.py +94 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_identity.py +19 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_lineage.py +51 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_memory.py +36 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_observation.py +39 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_resources.py +62 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_sensors.py +61 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_storage.py +134 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_summary_cohorts.py +163 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_summary_context.py +148 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_summary_metrics.py +267 -0
- inferyard-0.0.1/src/inferyard/contracts/schemas_tasks.py +176 -0
- inferyard-0.0.1/src/inferyard/contracts/validation.py +303 -0
- inferyard-0.0.1/src/inferyard/data/community/README.md +17 -0
- inferyard-0.0.1/src/inferyard/data/community/bundles/zh-core.json +2661 -0
- inferyard-0.0.1/src/inferyard/data/community/bundles/zh-smoke.json +734 -0
- inferyard-0.0.1/src/inferyard/data/community/bundles/zh-svg-pelican.json +32 -0
- inferyard-0.0.1/src/inferyard/data/community/configs/linux.example.toml +62 -0
- inferyard-0.0.1/src/inferyard/data/community/configs/macos.example.toml +62 -0
- inferyard-0.0.1/src/inferyard/data/community/configs/windows.example.toml +62 -0
- inferyard-0.0.1/src/inferyard/data/community/profile/prism-b10743-adfffbe-win-cpu-x64.json +513 -0
- inferyard-0.0.1/src/inferyard/data/community/profile/prism-b10743-adfffbe-win-cuda-12.4-x64.json +506 -0
- inferyard-0.0.1/src/inferyard/data/community/resources.json +11 -0
- inferyard-0.0.1/src/inferyard/data/engine_fit/mlx_server.py +494 -0
- inferyard-0.0.1/src/inferyard/data/implementation-files.json +443 -0
- inferyard-0.0.1/src/inferyard/data/methods.json +2596 -0
- inferyard-0.0.1/src/inferyard/data/metrics.json +1749 -0
- inferyard-0.0.1/src/inferyard/evidence/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/evidence/artifact_seal.py +40 -0
- inferyard-0.0.1/src/inferyard/evidence/cache_execution.py +68 -0
- inferyard-0.0.1/src/inferyard/evidence/capacity_stop.py +16 -0
- inferyard-0.0.1/src/inferyard/evidence/conditional_events.py +130 -0
- inferyard-0.0.1/src/inferyard/evidence/duration_ledger.py +70 -0
- inferyard-0.0.1/src/inferyard/evidence/engine_capabilities.py +25 -0
- inferyard-0.0.1/src/inferyard/evidence/engine_fit_checkpoint.py +63 -0
- inferyard-0.0.1/src/inferyard/evidence/error_reasons.py +273 -0
- inferyard-0.0.1/src/inferyard/evidence/event_ledger.py +253 -0
- inferyard-0.0.1/src/inferyard/evidence/fixed_output.py +98 -0
- inferyard-0.0.1/src/inferyard/evidence/formats.py +45 -0
- inferyard-0.0.1/src/inferyard/evidence/journal.py +224 -0
- inferyard-0.0.1/src/inferyard/evidence/lab.py +151 -0
- inferyard-0.0.1/src/inferyard/evidence/lab_parameters.py +109 -0
- inferyard-0.0.1/src/inferyard/evidence/ledger.py +499 -0
- inferyard-0.0.1/src/inferyard/evidence/length_evidence.py +107 -0
- inferyard-0.0.1/src/inferyard/evidence/lineage_files.py +102 -0
- inferyard-0.0.1/src/inferyard/evidence/native.py +137 -0
- inferyard-0.0.1/src/inferyard/evidence/native_receipts.py +51 -0
- inferyard-0.0.1/src/inferyard/evidence/performance_evidence.py +22 -0
- inferyard-0.0.1/src/inferyard/evidence/request_snapshots.py +61 -0
- inferyard-0.0.1/src/inferyard/evidence/service_drain.py +42 -0
- inferyard-0.0.1/src/inferyard/evidence/source_locations.py +46 -0
- inferyard-0.0.1/src/inferyard/evidence/storage.py +315 -0
- inferyard-0.0.1/src/inferyard/evidence/token_budgets.py +93 -0
- inferyard-0.0.1/src/inferyard/evidence/total_applicability.py +223 -0
- inferyard-0.0.1/src/inferyard/evidence/total_control_binding.py +81 -0
- inferyard-0.0.1/src/inferyard/evidence/trial_reads.py +59 -0
- inferyard-0.0.1/src/inferyard/extensions/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/extensions/client_capacity.py +80 -0
- inferyard-0.0.1/src/inferyard/extensions/closed_concurrency.py +205 -0
- inferyard-0.0.1/src/inferyard/extensions/complete_control_workflow.py +128 -0
- inferyard-0.0.1/src/inferyard/extensions/complete_trial_control.py +124 -0
- inferyard-0.0.1/src/inferyard/extensions/extension_evidence.py +196 -0
- inferyard-0.0.1/src/inferyard/extensions/extension_transport.py +261 -0
- inferyard-0.0.1/src/inferyard/extensions/independent_guard.py +131 -0
- inferyard-0.0.1/src/inferyard/extensions/native_tool_stream.py +92 -0
- inferyard-0.0.1/src/inferyard/extensions/native_tools.py +229 -0
- inferyard-0.0.1/src/inferyard/extensions/total_control_runtime.py +127 -0
- inferyard-0.0.1/src/inferyard/extensions/total_observer_control.py +258 -0
- inferyard-0.0.1/src/inferyard/extensions/trial_control_baseline.py +91 -0
- inferyard-0.0.1/src/inferyard/extensions/trial_control_evidence.py +99 -0
- inferyard-0.0.1/src/inferyard/extensions/workflow.py +363 -0
- inferyard-0.0.1/src/inferyard/implementation_identity.py +126 -0
- inferyard-0.0.1/src/inferyard/platforms/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/platforms/cpu_policy.py +141 -0
- inferyard-0.0.1/src/inferyard/platforms/device_host.py +102 -0
- inferyard-0.0.1/src/inferyard/platforms/device_macos.py +156 -0
- inferyard-0.0.1/src/inferyard/platforms/device_preflight.py +377 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit.py +481 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_entrypoints.py +225 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_lmstudio.py +200 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_lmstudio_files.py +121 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_macos.py +264 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_macos_listener.py +70 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_observer_io.py +69 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_windows.py +152 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_windows_files.py +102 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_windows_resources.py +99 -0
- inferyard-0.0.1/src/inferyard/platforms/engine_fit_windows_temperature.py +135 -0
- inferyard-0.0.1/src/inferyard/platforms/external_cpu.py +172 -0
- inferyard-0.0.1/src/inferyard/platforms/external_cpu_macos.py +114 -0
- inferyard-0.0.1/src/inferyard/platforms/external_cpu_windows.py +58 -0
- inferyard-0.0.1/src/inferyard/platforms/gguf_metadata.py +98 -0
- inferyard-0.0.1/src/inferyard/platforms/identity.py +453 -0
- inferyard-0.0.1/src/inferyard/platforms/lab_assets.py +117 -0
- inferyard-0.0.1/src/inferyard/platforms/lab_identity.py +164 -0
- inferyard-0.0.1/src/inferyard/platforms/macos_identity.py +253 -0
- inferyard-0.0.1/src/inferyard/platforms/macos_native.py +115 -0
- inferyard-0.0.1/src/inferyard/platforms/macos_process.py +80 -0
- inferyard-0.0.1/src/inferyard/platforms/model_assets.py +78 -0
- inferyard-0.0.1/src/inferyard/platforms/output_tree.py +70 -0
- inferyard-0.0.1/src/inferyard/platforms/output_tree_windows.py +97 -0
- inferyard-0.0.1/src/inferyard/platforms/platform_io.py +76 -0
- inferyard-0.0.1/src/inferyard/platforms/power_macos.py +73 -0
- inferyard-0.0.1/src/inferyard/platforms/resources.py +27 -0
- inferyard-0.0.1/src/inferyard/platforms/resources_linux.py +187 -0
- inferyard-0.0.1/src/inferyard/platforms/resources_macos.py +254 -0
- inferyard-0.0.1/src/inferyard/platforms/resources_windows.py +122 -0
- inferyard-0.0.1/src/inferyard/platforms/runtime_archive.py +67 -0
- inferyard-0.0.1/src/inferyard/platforms/runtime_profiles.py +166 -0
- inferyard-0.0.1/src/inferyard/platforms/runtime_verification.py +150 -0
- inferyard-0.0.1/src/inferyard/platforms/sensors_linux.py +170 -0
- inferyard-0.0.1/src/inferyard/platforms/sensors_macos.py +97 -0
- inferyard-0.0.1/src/inferyard/platforms/smc_macos.py +164 -0
- inferyard-0.0.1/src/inferyard/platforms/telemetry.py +170 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_api.py +118 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_host_paths.py +18 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_identity.py +163 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_lab_api.py +239 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_lab_checks.py +262 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_lab_files.py +161 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_lab_process.py +251 -0
- inferyard-0.0.1/src/inferyard/platforms/windows_runtime_prepare.py +92 -0
- inferyard-0.0.1/src/inferyard/provenance.py +19 -0
- inferyard-0.0.1/src/inferyard/registry.py +241 -0
- inferyard-0.0.1/src/inferyard/reporting/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/reporting/comparison_report.py +223 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit.py +244 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_binding_validation.py +116 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_html.py +200 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_metrics.py +50 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_validation.py +409 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_validation_primitives.py +39 -0
- inferyard-0.0.1/src/inferyard/reporting/engine_fit_windows_validation.py +92 -0
- inferyard-0.0.1/src/inferyard/reporting/export.py +194 -0
- inferyard-0.0.1/src/inferyard/reporting/public_package.py +278 -0
- inferyard-0.0.1/src/inferyard/reporting/repetition_report.py +141 -0
- inferyard-0.0.1/src/inferyard/reporting/report.py +238 -0
- inferyard-0.0.1/src/inferyard/reporting/report_assets.py +22 -0
- inferyard-0.0.1/src/inferyard/reporting/report_common.py +77 -0
- inferyard-0.0.1/src/inferyard/reporting/report_dashboard.py +102 -0
- inferyard-0.0.1/src/inferyard/reporting/report_duration.py +60 -0
- inferyard-0.0.1/src/inferyard/reporting/report_facets.py +44 -0
- inferyard-0.0.1/src/inferyard/reporting/report_profile.py +137 -0
- inferyard-0.0.1/src/inferyard/reporting/report_resources.py +140 -0
- inferyard-0.0.1/src/inferyard/reporting/report_scans.py +69 -0
- inferyard-0.0.1/src/inferyard/reporting/rescore.py +349 -0
- inferyard-0.0.1/src/inferyard/reporting/sealed_report.py +115 -0
- inferyard-0.0.1/src/inferyard/reporting/svg_render.py +39 -0
- inferyard-0.0.1/src/inferyard/runtime/__init__.py +1 -0
- inferyard-0.0.1/src/inferyard/runtime/batch_runner.py +307 -0
- inferyard-0.0.1/src/inferyard/runtime/batch_state.py +273 -0
- inferyard-0.0.1/src/inferyard/runtime/boundary_observer.py +99 -0
- inferyard-0.0.1/src/inferyard/runtime/cache_execution.py +12 -0
- inferyard-0.0.1/src/inferyard/runtime/collector_overhead.py +240 -0
- inferyard-0.0.1/src/inferyard/runtime/duration_driver.py +80 -0
- inferyard-0.0.1/src/inferyard/runtime/engine_fit.py +391 -0
- inferyard-0.0.1/src/inferyard/runtime/environment_observer.py +121 -0
- inferyard-0.0.1/src/inferyard/runtime/environment_schedule.py +52 -0
- inferyard-0.0.1/src/inferyard/runtime/fixed_output.py +42 -0
- inferyard-0.0.1/src/inferyard/runtime/host_files.py +110 -0
- inferyard-0.0.1/src/inferyard/runtime/host_migration.py +189 -0
- inferyard-0.0.1/src/inferyard/runtime/host_receipt.py +167 -0
- inferyard-0.0.1/src/inferyard/runtime/length_builder.py +86 -0
- inferyard-0.0.1/src/inferyard/runtime/length_prepare.py +111 -0
- inferyard-0.0.1/src/inferyard/runtime/lock.py +209 -0
- inferyard-0.0.1/src/inferyard/runtime/overhead_binding.py +75 -0
- inferyard-0.0.1/src/inferyard/runtime/overhead_runner.py +295 -0
- inferyard-0.0.1/src/inferyard/runtime/request_execution.py +255 -0
- inferyard-0.0.1/src/inferyard/runtime/runner.py +438 -0
- inferyard-0.0.1/src/inferyard/runtime/safety.py +128 -0
- inferyard-0.0.1/src/inferyard/runtime/safety_trace.py +55 -0
- inferyard-0.0.1/src/inferyard/runtime/service_observation.py +81 -0
- inferyard-0.0.1/src/inferyard/runtime/service_reuse.py +63 -0
- inferyard-0.0.1/src/inferyard/runtime/signals.py +26 -0
- inferyard-0.0.1/src/inferyard/runtime/template_tokens.py +41 -0
- inferyard-0.0.1/src/inferyard/runtime/trial_runner.py +379 -0
- inferyard-0.0.1/src/inferyard/templates/report.html +31 -0
- inferyard-0.0.1/src/inferyard/templates/report_advanced.html +52 -0
- inferyard-0.0.1/src/inferyard/templates/report_cases.html +3 -0
- inferyard-0.0.1/src/inferyard/templates/report_comparison.html +42 -0
- inferyard-0.0.1/src/inferyard/templates/report_engine_observation.html +11 -0
- inferyard-0.0.1/src/inferyard/templates/report_metrics.html +3 -0
- inferyard-0.0.1/src/inferyard/templates/report_profile.html +19 -0
- inferyard-0.0.1/src/inferyard/templates/report_resources.html +10 -0
- inferyard-0.0.1/src/inferyard/templates/report_results.html +11 -0
- inferyard-0.0.1/src/inferyard/templates/report_script.html +68 -0
- inferyard-0.0.1/src/inferyard/templates/report_styles.html +411 -0
- inferyard-0.0.1/src/inferyard/templates/report_svg.html +1 -0
- inferyard-0.0.1/uv.lock +368 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/artifacts/
|
|
2
|
+
/validation/
|
|
3
|
+
# Keep machine-bound configurations local; publish only reusable examples.
|
|
4
|
+
/configs/*
|
|
5
|
+
!/configs/README.md
|
|
6
|
+
!/configs/*.example.toml
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
/.venv/
|
|
10
|
+
/.uv-cache/
|
|
11
|
+
/.pytest_cache/
|
|
12
|
+
/.ruff_cache/
|
|
13
|
+
/.tools/
|
|
14
|
+
/dist/
|
|
15
|
+
/results/
|
|
16
|
+
/reports/
|
|
17
|
+
/.playwright-cli/
|
|
18
|
+
/output/playwright/
|
|
19
|
+
|
|
20
|
+
# Local credentials, model files and private evidence stay outside the public tree.
|
|
21
|
+
.env
|
|
22
|
+
.env.*
|
|
23
|
+
!.env.example
|
|
24
|
+
!.env.sample
|
|
25
|
+
*.pem
|
|
26
|
+
*.key
|
|
27
|
+
*.p12
|
|
28
|
+
*.pfx
|
|
29
|
+
*.gguf
|
|
30
|
+
*.ninfer
|
|
31
|
+
*.safetensors
|
inferyard-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Xudong Guo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
inferyard-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: inferyard
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Cross-platform local AI benchmarking CLI
|
|
5
|
+
Project-URL: Repository, https://github.com/sunny0826/inferyard
|
|
6
|
+
Project-URL: Issues, https://github.com/sunny0826/inferyard/issues
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Python: ==3.14.*
|
|
10
|
+
Requires-Dist: httpx<0.29,>=0.28
|
|
11
|
+
Requires-Dist: jinja2<3.2,>=3.1.6
|
|
12
|
+
Requires-Dist: jsonschema<5,>=4.25
|
|
13
|
+
Requires-Dist: psutil<8,>=7.2; sys_platform == 'win32'
|
|
14
|
+
Requires-Dist: psutil==7.2.2; sys_platform == 'darwin'
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# InferYard
|
|
18
|
+
|
|
19
|
+
用本地模型完成冻结题目,保存答案、耗时和资源证据,再生成可离线阅读的 HTML 报告。
|
|
20
|
+
质量、等待时间和内存分别展示;比较条件不足时说明原因,不合成一个总分。
|
|
21
|
+
|
|
22
|
+
**v0.0.1 使用 GitHub Release 附件安装;发布状态以 [Releases](https://github.com/sunny0826/inferyard/releases) 为准。**
|
|
23
|
+
项目采用 [MIT 许可证](LICENSE),尚未上传 PyPI。
|
|
24
|
+
产品为 Python CLI + 自包含 HTML,包名 `inferyard`,命令为 `inferyard`。
|
|
25
|
+
|
|
26
|
+
## 安装
|
|
27
|
+
|
|
28
|
+
从 [Releases](https://github.com/sunny0826/inferyard/releases) 中的 `v0.0.1` 下载同批 wheel、
|
|
29
|
+
`runtime-constraints.txt` 和 `SHA256SUMS`,按[安装指南](docs/installation.md#1-安装-uv-和工具)核对摘要后安装。
|
|
30
|
+
草稿公开后才会向用户提供下载。
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uv tool install --managed-python --python 3.14.7 --constraints runtime-constraints.txt ./inferyard-0.0.1-py3-none-any.whl
|
|
34
|
+
inferyard --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
临时试用同一文件:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uvx --isolated --managed-python --python 3.14.7 --constraints runtime-constraints.txt --from ./inferyard-0.0.1-py3-none-any.whl inferyard --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
无需克隆源码或安装 mise。首次准备 Python 和依赖需要联网;模型和引擎由操作者另行准备。
|
|
44
|
+
[安装指南](docs/installation.md)包含 uv 安装、三平台资产准备、服务绑定及离线使用。
|
|
45
|
+
维护者的[候选构建与安装检查](CONTRIBUTING.md#本地候选构建与安装检查)绑定同一批发行物;
|
|
46
|
+
至少完成一个平台的实际安装检查,其余平台明确标为未验证。每个候选均须完成同批构建与实际安装检查。
|
|
47
|
+
|
|
48
|
+
## 最短工作流
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
inferyard init --out bench-work --bundle zh-smoke
|
|
52
|
+
inferyard device-check --model /path/to/model.gguf --out bench-work/preflight --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
首次实时操作先完成[主机初始化](#首次主机初始化)。
|
|
56
|
+
按[安装指南](docs/installation.md#3-准备候选)生成候选配置,在外部终端启动其中声明的模型服务,
|
|
57
|
+
将实际 PID 和端点代入:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
inferyard config bind --candidate bench-work/candidate/candidate.toml --pid 1234 --endpoint http://127.0.0.1:48857 --out bench-work/bound
|
|
61
|
+
inferyard run --config bench-work/bound/config.toml
|
|
62
|
+
inferyard report --runs bench-work/results/RUN_ID --out bench-work/report
|
|
63
|
+
inferyard verify --path bench-work/report
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`RUN_ID` 取自运行结果。用浏览器打开 `bench-work/report/report.html`;服务关闭后仍可阅读和核验。
|
|
67
|
+
CLI 连接操作者启动的本机服务;`run` 包含当次普通/流式探测,独立 `probe` 用于可选排障。
|
|
68
|
+
|
|
69
|
+
## 平台与能力
|
|
70
|
+
|
|
71
|
+
| 平台 | 实现范围 | 入口 |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| Linux x64 | 单次、批量、CPU/内存采集;手工配置准备 | [安装](docs/installation.md#linux-x64) |
|
|
74
|
+
| Windows x64 | Prism/KVMem/NInfer 串行文本执行、原生身份与内存采集 | [Windows](WINDOWS.md) |
|
|
75
|
+
| macOS arm64 | 单次、批量、CPU/Metal 核验、CPU/RSS/换页采集 | [macOS](MACOS.md) |
|
|
76
|
+
|
|
77
|
+
[平台状态](docs/platforms.md)分别列出已实现、历史原生覆盖和当前候选未验项。
|
|
78
|
+
安装包能安装不等于所有引擎和传感器已通过原生验证。
|
|
79
|
+
|
|
80
|
+
题包覆盖指令遵循、提取、给定材料问答、数学逻辑、分类与结构化输出;SVG 题只展示生成结果。
|
|
81
|
+
评分采用冻结规则,不调用模型裁判。当前不包含社区账号、自动投稿、多机调度或多模态执行器。
|
|
82
|
+
|
|
83
|
+
## 继续阅读
|
|
84
|
+
|
|
85
|
+
[使用指南](docs/usage.md) · [CLI 参考](docs/cli-surface.md) · [报告](docs/reports.md) ·
|
|
86
|
+
[文档导航](docs/README.md) · [贡献指南](CONTRIBUTING.md) · [变更记录](CHANGELOG.md)
|
|
87
|
+
|
|
88
|
+
本仓库以 InferYard 当前源码建立全新 Git 历史。原始运行、模型资产与源项目旧 Git 历史不随仓库或安装包分发。
|
|
89
|
+
公开证据可通过 `public package` 生成脱敏包,结论范围见[证据血缘规则](docs/data-contract.md#证据血缘与比较结论)。
|
|
90
|
+
|
|
91
|
+
## 首次主机初始化
|
|
92
|
+
|
|
93
|
+
首次实时操作前执行 `inferyard host-state migrate`。它保存旧状态原字节、退休固定旧工具入口,
|
|
94
|
+
然后提交新状态;成功仍为 ready_to_run=false,运行前还要核验服务、资产和预算。
|
|
95
|
+
旧 dirty 先用原项目恢复;旧 lock-only 或凭据发布后来源变化需要调查,不能删锁或清空状态。
|
|
96
|
+
正常运行仅访问 inferyard-host.* 和不可变凭据。离线 verify/report 不建立主机状态。
|
|
97
|
+
历史格式和 origin=migrated 明确返回 unsupported_format/2;旧数据留在原项目处理。
|
|
98
|
+
Windows 原生迁移本次未验。详见[当前格式契约](docs/contracts/inferyard-current-format.md)。
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# InferYard
|
|
2
|
+
|
|
3
|
+
用本地模型完成冻结题目,保存答案、耗时和资源证据,再生成可离线阅读的 HTML 报告。
|
|
4
|
+
质量、等待时间和内存分别展示;比较条件不足时说明原因,不合成一个总分。
|
|
5
|
+
|
|
6
|
+
**v0.0.1 使用 GitHub Release 附件安装;发布状态以 [Releases](https://github.com/sunny0826/inferyard/releases) 为准。**
|
|
7
|
+
项目采用 [MIT 许可证](LICENSE),尚未上传 PyPI。
|
|
8
|
+
产品为 Python CLI + 自包含 HTML,包名 `inferyard`,命令为 `inferyard`。
|
|
9
|
+
|
|
10
|
+
## 安装
|
|
11
|
+
|
|
12
|
+
从 [Releases](https://github.com/sunny0826/inferyard/releases) 中的 `v0.0.1` 下载同批 wheel、
|
|
13
|
+
`runtime-constraints.txt` 和 `SHA256SUMS`,按[安装指南](docs/installation.md#1-安装-uv-和工具)核对摘要后安装。
|
|
14
|
+
草稿公开后才会向用户提供下载。
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install --managed-python --python 3.14.7 --constraints runtime-constraints.txt ./inferyard-0.0.1-py3-none-any.whl
|
|
18
|
+
inferyard --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
临时试用同一文件:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uvx --isolated --managed-python --python 3.14.7 --constraints runtime-constraints.txt --from ./inferyard-0.0.1-py3-none-any.whl inferyard --help
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
无需克隆源码或安装 mise。首次准备 Python 和依赖需要联网;模型和引擎由操作者另行准备。
|
|
28
|
+
[安装指南](docs/installation.md)包含 uv 安装、三平台资产准备、服务绑定及离线使用。
|
|
29
|
+
维护者的[候选构建与安装检查](CONTRIBUTING.md#本地候选构建与安装检查)绑定同一批发行物;
|
|
30
|
+
至少完成一个平台的实际安装检查,其余平台明确标为未验证。每个候选均须完成同批构建与实际安装检查。
|
|
31
|
+
|
|
32
|
+
## 最短工作流
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
inferyard init --out bench-work --bundle zh-smoke
|
|
36
|
+
inferyard device-check --model /path/to/model.gguf --out bench-work/preflight --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
首次实时操作先完成[主机初始化](#首次主机初始化)。
|
|
40
|
+
按[安装指南](docs/installation.md#3-准备候选)生成候选配置,在外部终端启动其中声明的模型服务,
|
|
41
|
+
将实际 PID 和端点代入:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
inferyard config bind --candidate bench-work/candidate/candidate.toml --pid 1234 --endpoint http://127.0.0.1:48857 --out bench-work/bound
|
|
45
|
+
inferyard run --config bench-work/bound/config.toml
|
|
46
|
+
inferyard report --runs bench-work/results/RUN_ID --out bench-work/report
|
|
47
|
+
inferyard verify --path bench-work/report
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`RUN_ID` 取自运行结果。用浏览器打开 `bench-work/report/report.html`;服务关闭后仍可阅读和核验。
|
|
51
|
+
CLI 连接操作者启动的本机服务;`run` 包含当次普通/流式探测,独立 `probe` 用于可选排障。
|
|
52
|
+
|
|
53
|
+
## 平台与能力
|
|
54
|
+
|
|
55
|
+
| 平台 | 实现范围 | 入口 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| Linux x64 | 单次、批量、CPU/内存采集;手工配置准备 | [安装](docs/installation.md#linux-x64) |
|
|
58
|
+
| Windows x64 | Prism/KVMem/NInfer 串行文本执行、原生身份与内存采集 | [Windows](WINDOWS.md) |
|
|
59
|
+
| macOS arm64 | 单次、批量、CPU/Metal 核验、CPU/RSS/换页采集 | [macOS](MACOS.md) |
|
|
60
|
+
|
|
61
|
+
[平台状态](docs/platforms.md)分别列出已实现、历史原生覆盖和当前候选未验项。
|
|
62
|
+
安装包能安装不等于所有引擎和传感器已通过原生验证。
|
|
63
|
+
|
|
64
|
+
题包覆盖指令遵循、提取、给定材料问答、数学逻辑、分类与结构化输出;SVG 题只展示生成结果。
|
|
65
|
+
评分采用冻结规则,不调用模型裁判。当前不包含社区账号、自动投稿、多机调度或多模态执行器。
|
|
66
|
+
|
|
67
|
+
## 继续阅读
|
|
68
|
+
|
|
69
|
+
[使用指南](docs/usage.md) · [CLI 参考](docs/cli-surface.md) · [报告](docs/reports.md) ·
|
|
70
|
+
[文档导航](docs/README.md) · [贡献指南](CONTRIBUTING.md) · [变更记录](CHANGELOG.md)
|
|
71
|
+
|
|
72
|
+
本仓库以 InferYard 当前源码建立全新 Git 历史。原始运行、模型资产与源项目旧 Git 历史不随仓库或安装包分发。
|
|
73
|
+
公开证据可通过 `public package` 生成脱敏包,结论范围见[证据血缘规则](docs/data-contract.md#证据血缘与比较结论)。
|
|
74
|
+
|
|
75
|
+
## 首次主机初始化
|
|
76
|
+
|
|
77
|
+
首次实时操作前执行 `inferyard host-state migrate`。它保存旧状态原字节、退休固定旧工具入口,
|
|
78
|
+
然后提交新状态;成功仍为 ready_to_run=false,运行前还要核验服务、资产和预算。
|
|
79
|
+
旧 dirty 先用原项目恢复;旧 lock-only 或凭据发布后来源变化需要调查,不能删锁或清空状态。
|
|
80
|
+
正常运行仅访问 inferyard-host.* 和不可变凭据。离线 verify/report 不建立主机状态。
|
|
81
|
+
历史格式和 origin=migrated 明确返回 unsupported_format/2;旧数据留在原项目处理。
|
|
82
|
+
Windows 原生迁移本次未验。详见[当前格式契约](docs/contracts/inferyard-current-format.md)。
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# 使用 uv 安装与准备测评
|
|
2
|
+
|
|
3
|
+
本页适用于 `0.0.1` 的 GitHub Release 附件安装。发布状态与下载见
|
|
4
|
+
[Releases](https://github.com/sunny0826/inferyard/releases);草稿公开后才提供下载,尚未上传 PyPI。
|
|
5
|
+
项目采用 [MIT 许可证](../LICENSE)。安装文件必须来自同一发行批次;
|
|
6
|
+
平台实现与未验项见[平台状态](platforms.md),接口见 [CLI](cli-surface.md)。
|
|
7
|
+
证据与比较结论遵循[证据血缘规则](data-contract.md#证据血缘与比较结论)。
|
|
8
|
+
|
|
9
|
+
## 1. 安装 uv 和工具
|
|
10
|
+
|
|
11
|
+
从 [uv 官方安装页](https://docs.astral.sh/uv/getting-started/installation/)选择 Windows
|
|
12
|
+
PowerShell、macOS 或 Linux 的独立安装器或包管理器。社区使用无须安装 mise、手动安装 Python
|
|
13
|
+
或克隆源码。安装器完成后重开终端;若 uv 不在 PATH,按安装器提示添加其 bin 目录。
|
|
14
|
+
工具入口不在 PATH 时运行 `uv tool update-shell`,再重开终端;本工具不会自行改 shell 配置。
|
|
15
|
+
|
|
16
|
+
在 `v0.0.1` Release 的附件中下载 `inferyard-0.0.1-py3-none-any.whl`、
|
|
17
|
+
`runtime-constraints.txt` 和 `SHA256SUMS`,放到同一目录。核对前两个文件的 SHA-256
|
|
18
|
+
与 `SHA256SUMS` 中的同名记录完全一致:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Linux
|
|
22
|
+
sha256sum inferyard-0.0.1-py3-none-any.whl runtime-constraints.txt
|
|
23
|
+
# macOS
|
|
24
|
+
shasum -a 256 inferyard-0.0.1-py3-none-any.whl runtime-constraints.txt
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
Get-FileHash -Algorithm SHA256 -Path '.\inferyard-0.0.1-py3-none-any.whl', '.\runtime-constraints.txt'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Release 还附带源码包与依赖约束验证文件;普通安装只需上述 wheel 和约束。
|
|
32
|
+
该批源码提交、候选摘要、Actions 来源及已验平台见 Release 说明。
|
|
33
|
+
安装结果遵循 `installed_safe_checks.v3`,不表示原生模型准备或性能实验通过。
|
|
34
|
+
维护者的[构建与核验步骤](../CONTRIBUTING.md#本地候选构建与安装检查)保持同批字节不变。
|
|
35
|
+
摘要一致后安装:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install --managed-python --python 3.14.7 --constraints runtime-constraints.txt ./inferyard-0.0.1-py3-none-any.whl
|
|
39
|
+
inferyard --versions
|
|
40
|
+
inferyard --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
PowerShell 将 `./...whl` 换为 `'.\inferyard-0.0.1-py3-none-any.whl'`;路径含空格或中文
|
|
44
|
+
时加引号。uv 管理 Python 和工具环境,缺解释器时首次安装需联网。首批目标为 Linux x64、
|
|
45
|
+
Windows x64、macOS arm64;纯 Python wheel 标签不证明所有平台的原生采集和引擎能力已验收。
|
|
46
|
+
当前验证基线为 Python 3.14.7 / uv 0.12.18,不宣称 uv 最低支持版本。
|
|
47
|
+
|
|
48
|
+
临时试用同一 wheel:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uvx --isolated --managed-python --python 3.14.7 --constraints runtime-constraints.txt --from ./inferyard-0.0.1-py3-none-any.whl inferyard --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`uvx` 是 `uv tool run` 的别名,`--from` 指定分发物,最后的 `inferyard` 是命令名。
|
|
55
|
+
不要使用 `uvx inferyard`。`--isolated` 避免复用同名持久工具的不同依赖环境;缓存仍可复用。
|
|
56
|
+
实际解释器、依赖和评分身份以 `--versions` 及证据为准,普通安装不会读取维护者仓库的 uv.lock。
|
|
57
|
+
公开索引安装命令要等名称归属和真实索引重装验证完成后提供。
|
|
58
|
+
|
|
59
|
+
## 2. 创建工作区与选择题包
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
inferyard init --out bench-work --bundle zh-smoke
|
|
63
|
+
inferyard device-check --model /path/to/model.gguf --out bench-work/preflight --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`--bundle` 可选 `zh-smoke`(默认)、`zh-core` 或 `zh-svg-pelican`。导出题包保留权威原字节和
|
|
67
|
+
内嵌人工审核;SVG 题只展示生成结果、不评分。工作区含三个平台的未绑定示例、一个所选题包、
|
|
68
|
+
空 `assets/`、`results/` 及入门说明。模板中的 `REPLACE` 项必须填完,不直接 run。
|
|
69
|
+
Windows 用实际盘符路径替换模型路径;所有系统均只读取已有模型,不自动下载。
|
|
70
|
+
|
|
71
|
+
五个准备命令的 `--out` 都是**不存在的新目录**,其父目录必须存在。已有空目录、文件和链接
|
|
72
|
+
一律拒绝,没有 `--force`。失败可能留下本次不完整目录;保留检查并换新目录重试,不覆盖原件。
|
|
73
|
+
`device-check` 的无模型检查可以完成,但创建候选需要成功的模型推荐。
|
|
74
|
+
|
|
75
|
+
## 3. 准备候选
|
|
76
|
+
|
|
77
|
+
### Windows x64:先准备固定 runtime
|
|
78
|
+
|
|
79
|
+
操作者从 Prism 上游的固定 release `prism-b10743-adfffbe` 下载归档;固定来源、文件名、大小和
|
|
80
|
+
SHA256 见 [Windows profile](contracts/windows-prism-batch-contract.md#社区安装的离线运行时准备)。
|
|
81
|
+
`runtime prepare` 不下载、不启动服务;它在完成全部资产核验后执行一次 `--version`(10 秒超时)。
|
|
82
|
+
不需要旧仓库回执,不要求 D 盘,普通用户的新目录即可。
|
|
83
|
+
|
|
84
|
+
CPU:
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
inferyard runtime prepare --profile prism-b10743-adfffbe-win-cpu-x64 `
|
|
88
|
+
--archive 'C:\Downloads\llama-prism-b10743-adfffbe-bin-win-cpu-x64.zip' `
|
|
89
|
+
--out 'bench-work\assets\cpu-runtime'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
CUDA 12.4:
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
inferyard runtime prepare --profile prism-b10743-adfffbe-win-cuda-12.4-x64 `
|
|
96
|
+
--archive 'C:\Downloads\llama-prism-b10743-adfffbe-bin-win-cuda-12.4-x64.zip' `
|
|
97
|
+
--runtime-archive 'C:\Downloads\cudart-llama-bin-win-cuda-12.4-x64.zip' `
|
|
98
|
+
--out 'bench-work\assets\cuda-runtime'
|
|
99
|
+
inferyard config create --preflight 'bench-work\preflight\device-preflight.json' `
|
|
100
|
+
--runtime-receipt 'bench-work\assets\cuda-runtime\runtime-receipt.json' `
|
|
101
|
+
--bundle 'bench-work\bundles\zh-smoke.json' --results 'bench-work\results' `
|
|
102
|
+
--out 'bench-work\candidate'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
按预检推荐的 mode 选择 CPU/CUDA;不匹配会阻断。CPU 禁止 `--runtime-archive`,CUDA 必填。
|
|
106
|
+
候选生成重新核验包内 profile、回执、全部成员、清单和实际字节,再查询引擎版本。
|
|
107
|
+
候选引用 runtime 目录的资产和清单,**不会复制**。移动或删除 runtime 目录后,既有候选失效;
|
|
108
|
+
应在确定位置重新生成候选并绑定。保留该目录直到所有引用它的配置不再使用。
|
|
109
|
+
|
|
110
|
+
### macOS arm64
|
|
111
|
+
|
|
112
|
+
准备已有、适配版本的 Prism 引擎及同目录动态库:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
inferyard config create --preflight bench-work/preflight/device-preflight.json --engine /path/to/llama-server --bundle bench-work/bundles/zh-smoke.json --results bench-work/results --out bench-work/candidate
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
候选生成会执行引擎 `--version`(10 秒),重新检查容量、mode 和 AC 电源;Metal 要求相应动态库。
|
|
119
|
+
`--model-repo` 默认为 local,`--model-revision` 默认为模型文件 SHA256,`--port` 默认为 48857。
|
|
120
|
+
本地 SHA256 不冒充上游模型 revision。macOS 不接受 Windows 回执。
|
|
121
|
+
|
|
122
|
+
### Linux x64
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
inferyard config assets --model /path/to/model.gguf --engine /path/to/llama-server --out bench-work/assets/local-model
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
此动作不执行引擎。它从 GGUF 导出原 UTF-8 模板字节,写出模型/引擎哈希和同目录共享库清单。
|
|
129
|
+
模板缺失时阻断,不使用其他模型或历史运行的模板。库链接只能指向引擎同目录内的普通文件。
|
|
130
|
+
|
|
131
|
+
复制 `bench-work/configs/linux.example.toml` 到新候选文件,按 `assets.json` 填入模型、引擎、
|
|
132
|
+
模板和清单路径/哈希;按实际设备和所选题包填写版本、线程、上下文、生成参数、环境与字节预算。
|
|
133
|
+
填写与外部服务完全一致的 `engine.startup_args`。保留未绑定哨兵 PID/start_ticks=1,随后由 bind
|
|
134
|
+
替换;这不是运行授权。Linux 首版不提供自动候选算法,禁止为了通过而降低停止条件。
|
|
135
|
+
|
|
136
|
+
## 4. 外部启动、绑定、运行与报告
|
|
137
|
+
|
|
138
|
+
首次实时操作先完成[主机初始化](#首次主机初始化)。
|
|
139
|
+
操作者按照候选 `engine.binary_path` 和完整 `engine.startup_args` 在外部终端启动服务。
|
|
140
|
+
CLI 不管理该服务的启动、终止或重启。将实际 PID 和本机端点代入:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
inferyard config bind --candidate bench-work/candidate/candidate.toml --pid 1234 --endpoint http://127.0.0.1:48857 --out bench-work/bound
|
|
144
|
+
inferyard run --config bench-work/bound/config.toml
|
|
145
|
+
inferyard report --runs bench-work/results/RUN_ID --out bench-work/report
|
|
146
|
+
inferyard verify --path bench-work/report
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Linux 的 `--candidate` 换成手工填写的新 TOML。绑定只读取进程身份和 argv,不发送模型请求。
|
|
150
|
+
PID、启动时间或参数不符会阻断;不要修改候选去掩盖观测差异。`run` 会做当次普通/流式探测,
|
|
151
|
+
独立 `probe` 仅用于可选排障且会发送请求。服务恢复、dirty、主机锁、取消和排空仍按原规则执行。
|
|
152
|
+
不要手工删除锁文件,也不要在运行或恢复期间升级工具环境。
|
|
153
|
+
|
|
154
|
+
用浏览器打开 `bench-work/report/report.html`。报告自包含,服务关闭后仍可离线阅读;
|
|
155
|
+
`verify` 离线检查已有产物。准备 JSON 的 prepared/complete 不表示测评或平台验收完成。
|
|
156
|
+
Windows/PowerShell 可使用相同 CLI 参数,路径加引号,PID 使用实际数字。
|
|
157
|
+
|
|
158
|
+
## 5. 升级、回退和离线
|
|
159
|
+
|
|
160
|
+
在运行和恢复结束后,取得新版本同批 wheel、约束及摘要,以相同安装命令显式安装。
|
|
161
|
+
回退时使用保留的旧 wheel 和旧约束,不重写用户工作区或旧证据。`0.0.1` 是首个发行版本;
|
|
162
|
+
测试中的合成升级/回退不代表历史正式版本兼容。已安装同版本时可显式 `uv tool install --force ...` 重装。
|
|
163
|
+
|
|
164
|
+
正式运行优先使用持久安装。直接调用安装后的离线命令不会下载依赖;uvx 冷缓存需要准备环境:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
uvx --offline --isolated --managed-python --python 3.14.7 --constraints runtime-constraints.txt --from ./inferyard-0.0.1-py3-none-any.whl inferyard --versions
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`--offline` 要求解释器、wheel 和依赖均已在所选缓存中,冷缓存明确失败,不隐藏首次联网需求。
|
|
171
|
+
uvx 缓存可清理,外部长期 MLX 服务使用持久安装提供的脚本路径;不要在其运行时清缓存。
|
|
172
|
+
下载/证书/代理问题按 [uv 网络配置](https://docs.astral.sh/uv/concepts/configuration-files/)排查;
|
|
173
|
+
安装失败与模型/设备不支持分开报告。记录报错及 `uv --version`,不要将凭据写入 CLI 参数或日志。
|
|
174
|
+
|
|
175
|
+
准备命令 stdout 为 JSON、stderr 为脱敏诊断;0 准备完成、2 输入/身份阻断、4 IO/工具错误、
|
|
176
|
+
130 取消。正式 run 不完整可退出 3,模型答错不等于 CLI 失败。完整语义见 CLI 契约。
|
|
177
|
+
|
|
178
|
+
## 首次主机初始化
|
|
179
|
+
|
|
180
|
+
首次实时操作前执行 `inferyard host-state migrate`。它保存旧状态原字节、退休固定旧工具入口,
|
|
181
|
+
然后提交新状态;成功仍为 ready_to_run=false,运行前还要核验服务、资产和预算。
|
|
182
|
+
旧 dirty 先用原项目恢复;旧 lock-only 或凭据发布后来源变化需要调查,不能删锁或清空状态。
|
|
183
|
+
正常运行仅访问 inferyard-host.* 和不可变凭据。离线 verify/report 不建立主机状态。
|
|
184
|
+
历史格式和 origin=migrated 明确返回 unsupported_format/2;旧数据留在原项目处理。
|
|
185
|
+
Windows 原生迁移本次未验。详见[当前格式契约](contracts/inferyard-current-format.md)。
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling==1.32.4"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "inferyard"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "Cross-platform local AI benchmarking CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = "==3.14.*"
|
|
13
|
+
dependencies = [
|
|
14
|
+
"httpx>=0.28,<0.29",
|
|
15
|
+
"jinja2>=3.1.6,<3.2",
|
|
16
|
+
"jsonschema>=4.25,<5",
|
|
17
|
+
"psutil>=7.2,<8; sys_platform == 'win32'",
|
|
18
|
+
"psutil==7.2.2; sys_platform == 'darwin'",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Repository = "https://github.com/sunny0826/inferyard"
|
|
23
|
+
Issues = "https://github.com/sunny0826/inferyard/issues"
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
inferyard = "inferyard.cli:main"
|
|
27
|
+
|
|
28
|
+
[dependency-groups]
|
|
29
|
+
# Cross-platform test doubles import native helpers on Linux as well.
|
|
30
|
+
dev = ["pytest>=8.4,<10", "jsonschema>=4.25,<5", "psutil==7.2.2", "ruff>=0.12,<1"]
|
|
31
|
+
|
|
32
|
+
[tool.uv]
|
|
33
|
+
build-constraint-dependencies = [
|
|
34
|
+
"hatchling==1.32.4",
|
|
35
|
+
"packaging==26.3",
|
|
36
|
+
"pathspec==1.1.1",
|
|
37
|
+
"pluggy==1.6.0",
|
|
38
|
+
"tomlkit==0.15.1",
|
|
39
|
+
"trove-classifiers==2026.9.21.13",
|
|
40
|
+
"editables==0.6",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/inferyard"]
|
|
45
|
+
include = [
|
|
46
|
+
"src/inferyard/**/*.py", "src/inferyard/templates/**/*.html",
|
|
47
|
+
"src/inferyard/data/*.json", "src/inferyard/data/community/resources.json",
|
|
48
|
+
"src/inferyard/data/community/README.md",
|
|
49
|
+
"src/inferyard/data/community/configs/*.example.toml",
|
|
50
|
+
"src/inferyard/data/community/bundles/*.json",
|
|
51
|
+
"src/inferyard/data/community/profile/*.json",
|
|
52
|
+
]
|
|
53
|
+
exclude = ["**/__pycache__", "**/*.pyc", "**/*.pyo"]
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.sdist]
|
|
56
|
+
# Explicit build inputs only; no real device configurations, evidence, caches or model assets.
|
|
57
|
+
only-include = [
|
|
58
|
+
"pyproject.toml", "uv.lock", "LICENSE", "README.md", "docs/installation.md", ".gitignore",
|
|
59
|
+
"src/inferyard",
|
|
60
|
+
]
|
|
61
|
+
include = [
|
|
62
|
+
"/pyproject.toml", "/uv.lock", "/LICENSE", "/README.md", "/docs/installation.md", "/.gitignore",
|
|
63
|
+
"src/inferyard/**/*.py", "src/inferyard/templates/**/*.html",
|
|
64
|
+
"src/inferyard/data/*.json", "src/inferyard/data/community/resources.json",
|
|
65
|
+
"src/inferyard/data/community/README.md",
|
|
66
|
+
"src/inferyard/data/community/configs/*.example.toml",
|
|
67
|
+
"src/inferyard/data/community/bundles/*.json",
|
|
68
|
+
"src/inferyard/data/community/profile/*.json",
|
|
69
|
+
]
|
|
70
|
+
exclude = ["**/__pycache__", "**/*.pyc", "**/*.pyo"]
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
testpaths = ["tests"]
|
|
74
|
+
addopts = "-ra --strict-markers"
|
|
75
|
+
|
|
76
|
+
[tool.ruff]
|
|
77
|
+
target-version = "py314"
|
|
78
|
+
line-length = 100
|
|
79
|
+
|
|
80
|
+
[tool.ruff.lint]
|
|
81
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Explicitly supported inference adapters; no dynamic plugin loading."""
|