Skip to content

Conversation

glennko
Copy link
Member

@glennko glennko commented Sep 17, 2025

fix library name absolufy in requirements-dev.txt

fix library name absolufy in requirements-dev.txt
- Fix critical typo: torch.optim.adam -> torch.optim.Adam
- Improve exception handling: bare except -> specific json.JSONDecodeError
- Add proper NotImplementedError messages for placeholder classes
- Add missing DatasetDict type hint in text_dataset.py
- Add reference to AGENTS.md in CONTRIBUTING.md

def _validate(self):
pass
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a good practice to return an exception instance instead of the class. It works, but I would use NotImplementedError()

pass
logger (bool, optional): To be setup with a Pytorch Lightning logger when implemented.
"""
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I would return the instance instead of the class


def generate(
self,
texts: Optional[Union[List[str], str]] = None,
dataset: Optional[Text2ImageDataset] = None,
):
pass
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same


def save(self, path: Union[str, Path]):
pass
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants