diff --git a/sub-packages/bionemo-amplify/tests/bionemo/amplify/__init__.py b/sub-packages/bionemo-amplify/tests/bionemo/amplify/__init__.py new file mode 100644 index 000000000..25e6abfbc --- /dev/null +++ b/sub-packages/bionemo-amplify/tests/bionemo/amplify/__init__.py @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-Apache2 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/sub-packages/bionemo-amplify/tests/bionemo/amplify/test_model.py b/sub-packages/bionemo-amplify/tests/bionemo/amplify/test_model.py new file mode 100644 index 000000000..56d66a4fb --- /dev/null +++ b/sub-packages/bionemo-amplify/tests/bionemo/amplify/test_model.py @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-Apache2 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from bionemo.amplify.model import AMPLIFYConfig, AMPLIFYModel +from bionemo.amplify.tokenizer import BioNeMoAMPLIFYTokenizer +from bionemo.esm2.model.embedding import ESM2Embedding +from bionemo.llm.model.biobert.model import MegatronBioBertModel +from bionemo.testing import megatron_parallel_state_utils + + +def test_amplify_model_initialized(): + with megatron_parallel_state_utils.distributed_model_parallel_state(): + tokenizer = BioNeMoAMPLIFYTokenizer() + config = AMPLIFYConfig() + model = config.configure_model(tokenizer) + + assert isinstance(model, MegatronBioBertModel) + assert isinstance(model, AMPLIFYModel) + assert isinstance(model.embedding, ESM2Embedding) diff --git a/sub-packages/bionemo-esm2/tests/bionemo/esm2/data/__init__.py b/sub-packages/bionemo-esm2/tests/bionemo/esm2/data/__init__.py new file mode 100644 index 000000000..25e6abfbc --- /dev/null +++ b/sub-packages/bionemo-esm2/tests/bionemo/esm2/data/__init__.py @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-Apache2 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License.