diff --git a/conf.py b/conf.py new file mode 100644 index 00000000..95e20cf3 --- /dev/null +++ b/conf.py @@ -0,0 +1,27 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'rda' +copyright = '2024, r' +author = 'r' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/docs/conf.py b/docs/conf.py index 65fb9388..814b4eae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,6 +17,7 @@ extensions = [ "sphinx.ext.autodoc", + "sphinxcontrib.autodoc_pydantic" ] autodoc_member_order = "bysource" @@ -61,4 +62,4 @@ except ImportError: html_theme = "default" -html_static_path = ["_static"] +html_static_path = ["_static"] \ No newline at end of file diff --git a/docs/research/benchmark.rst b/docs/research/benchmark.rst index bc4cf42e..766d1dc6 100644 --- a/docs/research/benchmark.rst +++ b/docs/research/benchmark.rst @@ -17,16 +17,6 @@ Development Capability Benchmarking =================================== -.. TODO: - Setting. - https://autodoc-pydantic.readthedocs.io/en/stable/users/faq.html - - -.. autopydantic_model:: target.faq.inherited_members.WithoutInheritedMembers - - - - Benchmark is used to evaluate the effectiveness of code with fixed data. It mainly includes the following steps: @@ -41,6 +31,12 @@ It mainly includes the following steps: 5.save and show the result +Configuration +------------- + +.. autopydantic_settings:: rdagent.components.benchmark.conf.BenchmarkSettings + + Run Benchmark ------------- @@ -70,7 +66,7 @@ Modify the python code in ``rdagent/app/quant_factor_benchmark/analysis.py`` to A png file will be saved to the designated path as shown below. -.. image:: _static/benchmark.png +.. image:: ../_static/benchmark.png diff --git a/rdagent/components/benchmark/conf.py b/rdagent/components/benchmark/conf.py index a05bbe39..76be67d6 100644 --- a/rdagent/components/benchmark/conf.py +++ b/rdagent/components/benchmark/conf.py @@ -7,23 +7,33 @@ from pydantic_settings import BaseSettings -DIRNAME = Path(__file__).absolute().resolve().parent +DIRNAME = Path("./") class BenchmarkSettings(BaseSettings): class Config: - env_prefix = "BENCHMARK_" # Use BENCHMARK_ as prefix for environment variables + env_prefix = "BENCHMARK_" + """Use `BENCHMARK_` as prefix for environment variables""" ground_truth_dir: Path = DIRNAME / "ground_truth" + """ground truth dir""" bench_data_path: Path = DIRNAME / "example.json" + """data for benchmark""" bench_test_round: int = 10 - bench_test_case_n: Optional[int] = None # how many test cases to run; If not given, all test cases will be run + """how many rounds to run, each round may cost 10 minutes""" + + bench_test_case_n: Optional[int] = None + """how many test cases to run; If not given, all test cases will be run""" bench_method_cls: str = "rdagent.components.coder.factor_coder.CoSTEER.FactorCoSTEER" + """method to be used for test cases""" + bench_method_extra_kwargs: dict = field( default_factory=dict, - ) # extra kwargs for the method to be tested except the task list + ) + """extra kwargs for the method to be tested except the task list""" bench_result_path: Path = DIRNAME / "result" + """result save path"""