mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
20778a9b87
* use conda to run kaggle and mlebench code * refactor: Simplify environment configuration and execution logic * add setting to use local env in ds * refine dockerfile * fix: Move MLEBDockerEnv initialization inside conditionals & fix condaenv * refactor: reformat code for better readability and consistency * feat: add conda env to all envs. * fix: fix bugs when run loop * refactor: Simplify DockerEnv configuration in mle_summary.py * fix image bug * style: reformat code for better readability and consistency * change commit * feat: Add entrypoint script for sing_docker scenario in rdagent * refactor: add Any type hints and comments for clarity in env.py * feat: Create log directory if it doesn't exist in entrypoint script * feat: Add debug mode and list root directory in entrypoint script * fix: Remove specific branch checkout in Dockerfile for RD-Agent * fix: Add competition argument to loop.py script execution * fix: Correct directory navigation and dependency installation in entrypoint.sh * fix: Correct user ownership assignment in entrypoint script * refactor: Comment out redundant log copying to RD_OUTPUT_DIR * fix: Unset LOG_TRACE_PATH to prevent log contamination in entrypoint.sh --------- Co-authored-by: Xu Yang <peteryang@vip.qq.com>
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
from typing import Dict, Optional
|
|
|
|
from rdagent.components.coder.CoSTEER.task import CoSTEERTask
|
|
|
|
|
|
# Because we use isinstance to distinguish between different types of tasks, we need to use sub classes to represent different types of tasks
|
|
class ModelTask(CoSTEERTask):
|
|
def __init__(
|
|
self,
|
|
name: str,
|
|
description: str,
|
|
architecture: str = "",
|
|
*args,
|
|
hyperparameters: Dict[str, str] = {},
|
|
model_type: Optional[str] = None,
|
|
**kwargs,
|
|
) -> None:
|
|
self.architecture: str = architecture
|
|
self.hyperparameters: str = hyperparameters
|
|
self.model_type: str | None = (
|
|
model_type # Tabular for tabular model, TimesSeries for time series model, Graph for graph model, XGBoost for XGBoost model
|
|
# TODO: More Models Supported
|
|
)
|
|
super().__init__(name=name, description=description, *args, **kwargs)
|
|
|
|
def get_task_information(self):
|
|
task_desc = f"""name: {self.name}
|
|
description: {self.description}
|
|
"""
|
|
if self.architecture:
|
|
task_desc += f"architecture: {self.architecture}\n"
|
|
if self.hyperparameters:
|
|
task_desc += f"hyperparameters: {self.hyperparameters}\n"
|
|
if self.model_type:
|
|
task_desc += f"model_type: {self.model_type}\n"
|
|
return task_desc
|