Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

馃悰 [TaskRemoval/TaskRepair] - 16 Extra period in tests vs prompt聽#30

Description

@dmelcer9

BigCodeBench version

v0_1_0_hf

Output of running ls ~/.cache/bigcodebench

4d5763508127102b6e158f7e678eafb2.pkl 76104768c76d90a5016e14486517977c.pkl 7eec4137569dc2cd75b89bed448ef8d3.pkl bd357671b112b365ba5b068649b30cae.pkl BigCodeBench-v0.1.0_hf.jsonl f5bee38760ab29aa6a54147e668e839f.pkl

Task ID of the programming task

BigCodeBench/16

The original complete prompt

import os
import glob
import subprocess
def task_func(directory, backup_dir='/path/to/backup'):
    """
    Backup all '.log' files in a specified directory to a tar.gz file and delete the original files after backup.
    The backup file is named 'logs_backup.tar.gz' and placed in the specified backup directory.
    
    Parameters:
    - directory (str): The directory that contains the log files to be backed up.
    - backup_dir (str, optional): The directory where the backup file will be saved.
                                  Default is '/path/to/backup'.
    
    Returns:
    - str: The path to the backup file if logs are found, otherwise returns a message 'No logs found to backup'.
    
    Raises:
    - FileNotFoundError: If the specified directory does not exist.
    
    Requirements:
    - subprocess
    - glob
    - os
    
    Example:
    >>> task_func('/path/to/logs')
    '/path/to/backup/logs_backup.tar.gz'
    >>> task_func('/path/to/logs', '/alternative/backup/dir')
    '/alternative/backup/dir/logs_backup.tar.gz'
    """

Your proposed new complete prompt

import os
import glob
import subprocess
def task_func(directory, backup_dir='/path/to/backup'):
    """
    Backup all '.log' files in a specified directory to a tar.gz file and delete the original files after backup.
    The backup file is named 'logs_backup.tar.gz' and placed in the specified backup directory.
    
    Parameters:
    - directory (str): The directory that contains the log files to be backed up.
    - backup_dir (str, optional): The directory where the backup file will be saved.
                                  Default is '/path/to/backup'.
    
    Returns:
    - str: The path to the backup file if logs are found, otherwise returns a message 'No logs found to backup.'.
    
    Raises:
    - FileNotFoundError: If the specified directory does not exist.
    
    Requirements:
    - subprocess
    - glob
    - os
    
    Example:
    >>> task_func('/path/to/logs')
    '/path/to/backup/logs_backup.tar.gz'
    >>> task_func('/path/to/logs', '/alternative/backup/dir')
    '/alternative/backup/dir/logs_backup.tar.gz'
    """

Other context

Alternatively (preferred) fix the tests and ground truth so that the period isn't required for "No logs found to backup."

Activity

  1. changed the title [-]馃悰 [TaskRemoval/TaskRepair] - <TASK_ID> <WHY>[/-] [+]馃悰 [TaskRemoval/TaskRepair] - 16 Extra period in tests vs prompt[/+] on Jul 23, 2024
  2. terryyz commented on Jul 24, 2024

    @terryyz
    Collaborator

    Thanks @dmelcer9! This will be updated in the next BigCodeBench release (e.g., v0.2.0).

  3. self-assigned this
    on Jul 24, 2024
  4. added
    enhancementNew feature or request
    bugSomething isn't working
    and removed
    enhancementNew feature or request
    on Jul 24, 2024
  5. hvaara commented on Sep 1, 2024

    @hvaara
    Contributor

    I'm taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions