Skip to content

data_class.PieceData dependency removal #15

@TaegyunKwon

Description

@TaegyunKwon

PieceData와 PieceMeta에서 xml과 performance들을 불러올 때 폴더 구조를 이용해서 읽어오게 하고 있는데요 (ex: PieceMeta._load_list_of_performances)
제 생각에 가장 기본적인 unit은 xml하나, (연주)midi 하나를 불러서 pair를 만들어 주는 class일 것 같아요.

그래서 현재는

class PieceData:
    def __init__(self, xml_path, data_structure='folder', dataset_name='chopin_cleaned', composer=None):
        Load_and_parse()

인데

class PieceData:
    def __init__(self, xml_path, performance_path_list, composer=None):
        Load_and_parse()

로 가고, performance_path_list는 상위인 DataSet이 처리하는게 좋을 거 같습니다.

또, 그러면 Dataset에도 똑같이 파일 구조에 맞춰서 파일을 로드하는 부분이 생길텐데요, 이 부분은 사실 데이터셋 마다 달라져야 하는 부분인 만큼 아예 dataset에 specific한 class를 만들어서 처리하면 좋을거 같아요

class Dataset:
    ....

    def files(self):
        raise NotImplementedError


class ChopinCleaned(Datatset):
    def files(self):
        Load_files_according_to_dataset_structure
        return xml_path, performance_path_list, composer_name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions