Repository: microsoft/RD-Agent
File: rdagent/scenarios/data_science/proposal/exp_gen/package_info.py (Python)

Code before:
PYTHON_ADVANCED_PACKAGES = [
    "accelerate",
    "albumentations",
    "bayesian-optimization",
    "category_encoders",
    "datasets",
    "featuretools",
    "imbalanced-learn",
    "nltk",
    "opencv-python",
    "pillow",
    "polars",
    "sentence-transformers",
    "spacy",
    "tensorflow",
    "timm",
    "tokenizers",
    "torch",
    "torchvision",
    "transformers",
]


def get_all_available_packages():
    """Get flattened list of all packages"""
    all_packages = PYTHON_BASE_PACKAGES + PYTHON_ADVANCED_PACKAGES
    return sorted(set(all_packages))


def get_available_packages_prompt():
    """Generate prompt template for dynamically detected available packages"""
    installed_packages = get_installed_packages()

    # Check which packages are actually installed
    base_available = [pkg for pkg in PYTHON_BASE_PACKAGES if pkg.lower() in installed_packages]
    advanced_available = [pkg for pkg in PYTHON_ADVANCED_PACKAGES if pkg.lower() in installed_packages]

    # Build prompt
    prompt_parts = ["# Available packages in environment:\n"]

    if base_available:
        prompt_parts.append("## 【Basic Libraries】(general tools for data science tasks):")
        prompt_parts.append(f"- {', '.join(base_available)}")
        prompt_parts.append("")

    if advanced_available:
        prompt_parts.append("## 【Advanced Tools】(specialized for specific domains):")
        prompt_parts.append(f"- {', '.join(advanced_available)}")
        prompt_parts.append("")

    prompt_parts.append(

Review comment (suggestion):
```suggestion
    # TODO: check the availability of the packagess.  Otherwise, it will not match other environment.
    all_packages = PYTHON_BASE_PACKAGES + PYTHON_ADVANCED_PACKAGES
```

Code after:
PYTHON_ADVANCED_PACKAGES = [
    "accelerate",
    "albumentations",
    "bayesian-optimization",
    "category_encoders",
    "datasets",
    "featuretools",
    "imbalanced-learn",
    "nltk",
    "opencv-python",
    "pillow",
    "polars",
    "sentence-transformers",
    "spacy",
    "tensorflow",
    "timm",
    "tokenizers",
    "torch",
    "torchvision",
    "transformers",
]


def get_all_excepted_packages():
    """Get flattened list of all packages"""
    all_packages = PYTHON_BASE_PACKAGES + PYTHON_ADVANCED_PACKAGES
    return sorted(set(all_packages))


def get_available_recommended_packages_prompt():
    """Generate prompt template for dynamically detected available packages"""
    installed_packages = get_installed_packages()

    # Check which packages are actually installed
    base_available = [pkg for pkg in PYTHON_BASE_PACKAGES if pkg.lower() in installed_packages]
    advanced_available = [pkg for pkg in PYTHON_ADVANCED_PACKAGES if pkg.lower() in installed_packages]

    # Build prompt
    prompt_parts = ["# Available packages in environment:\n"]

    if base_available:
        prompt_parts.append("## [Basic Libraries] (general tools for data science tasks):")
        prompt_parts.append(f"- {', '.join(base_available)}")
        prompt_parts.append("")

    if advanced_available:
        prompt_parts.append("## [Advanced Tools] (specialized for specific domains):")
        prompt_parts.append(f"- {', '.join(advanced_available)}")
        prompt_parts.append("")

    prompt_parts.append(