Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added task_type parameter for correct model loading #245

Merged

Conversation

MarleneKress79789
Copy link
Collaborator

@MarleneKress79789 MarleneKress79789 commented Jun 26, 2024

All Submissions:

  • Is the title of the Pull Request correct?
  • Is the title of the corresponding issue correct?
  • Have you updated the changelog?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you mentioning the issue which this PullRequest fixes ("Fixes...")
  • Before you merge don't forget to run tests in AWS CodeBuild, by adding [CodeBuild] to the commit message

this pr is a mismash of tickets to get to a working release as fast as possible. it aims to fix the main problems presented in #213. in order to archive this it partly does tasks in these tickets:
#221
#220
#219

and fixes #218

@MarleneKress79789 MarleneKress79789 self-assigned this Jun 26, 2024
@ckunki ckunki changed the title Assed task_type parameter for correct model loading Added task_type parameter for correct model loading Jun 26, 2024
exasol_transformers_extension/upload_model.py Outdated Show resolved Hide resolved
exasol_transformers_extension/upload_model.py Outdated Show resolved Hide resolved
tests/fixtures/model_fixture.py Show resolved Hide resolved
exasol_transformers_extension/utils/model_specification.py Outdated Show resolved Hide resolved

@pytest.fixture(scope="session")
def prepare_base_model_for_local_bucketfs(tmpdir_factory) -> PurePosixPath:
def prepare_question_answering_model_for_local_bucketfs(tmpdir_factory) -> PurePosixPath:
model_specification = model_params.base_model_specs
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think, you should select one model per task for testing, because the base_model "bert_uncased" can't be used for all tasks. I think, it can be used for mask filling, sequence classification, zero shot classification and maybe text generation. I think, it can't used for translation, question answering.

bucketfs_connections = [Connection(address=f"file:///test{i}") for i in range(count)]
bfs_conn_name = [f"bfs_conn_name_{i}" for i in bucketfs_connections]

mock_cmss = [create_autospec(CurrentModelSpecification,
mock_cmss = [create_autospec(BucketFSModelSpecification,
model_name=base_model_names[i],
Copy link
Collaborator

Choose a reason for hiding this comment

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

wow, cool, that I didn't knew

tkilias
tkilias previously approved these changes Aug 5, 2024

_BACKEND_OPTION = '--backend'

def pytest_addoption(parser):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should rename this on to pytest_add_option at some point, adoption is something else.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This function name is defined by pytest and can't be changed

@MarleneKress79789 MarleneKress79789 merged commit 4cca904 into main Aug 7, 2024
4 checks passed
@MarleneKress79789 MarleneKress79789 deleted the bug/add_task_type_parameter_for_correct_model_loading branch August 7, 2024 10:08
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.

Change upload cli to use HuggingFaceHubBucketFSModelTransferSP
2 participants