Skip to content

Conversation

@pmeier
Copy link
Contributor

@pmeier pmeier commented Jan 19, 2022

Follow-up to #5207 (comment)

cc @pmeier @bjuncek

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 19, 2022

💊 CI failures summary and remediations

As of commit cbf128b (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



🚧 2 ongoing upstream failures:

These were probably caused by upstream breakages that are not fixed yet.


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

def _parse_mock_data(self, mock_data_fn):
def wrapper(info, root, config):
mock_infos = mock_data_fn(info, root, config)
def _parse_mock_data(self, config, mock_infos):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just GitHub not picking up on the identation change. Before this was a decorator, but I changed it into a regular method. The actual body has not changed.

num_samples = 5 if config.split == "train" else 3

path = root / f"{config.split}.txt"
path = root / f"{config.split}.csv"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change and everything below in this file are actual bugs in our mock data generation that were hidden by our custom loading logic.

Copy link
Member

Choose a reason for hiding this comment

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

Do you know why the tests were passing before despite the files had the wrong name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before the resources where not collected by the regular logic, but rather "hand-fed" to _make_datapipe. So as long as the data in mock_resources[0] corresponded to Dataset.resources(...)[0] the test suite didn't notice.

num_samples = 5 if config.split == "train" else 3

path = root / f"{config.split}.txt"
path = root / f"{config.split}.csv"
Copy link
Member

Choose a reason for hiding this comment

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

Do you know why the tests were passing before despite the files had the wrong name?

@pmeier pmeier merged commit 4d08a67 into pytorch:main Jan 20, 2022
@pmeier pmeier deleted the datasets/test-load-thorugh-api branch January 20, 2022 15:21
facebook-github-bot pushed a commit that referenced this pull request Jan 26, 2022
Summary:
* refactor prototype dataset tests to use public API for loading

* add explanation

* use loop alternative

Reviewed By: jdsgomes, prabhat00155

Differential Revision: D33739387

fbshipit-source-id: 1ea4f7e925d6c686fa937d6cab162076ed887bc3
Comment on lines -123 to -126
try:
self.info.check_dependencies()
except ModuleNotFoundError as error:
pytest.skip(str(error))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should have not been removed. The tests should be runnable even if no or not all third party dependencies are installed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants