Skip to content

Commit

Permalink
Change location of env var
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wolf <rywolf@nvidia.com>
  • Loading branch information
ryantwolf committed Apr 17, 2024
1 parent aa36931 commit 3592977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions nemo_curator/filters/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ def keep_document(self, score):
class TokenizerFertilityFilter(DocumentFilter):

def __init__(self, path_to_tokenizer=None, min_char_to_token_ratio=2.5):
import os

os.environ["TORCHINDUCTOR_COMPILE_THREADS"] = "1"
from nemo.collections.common.tokenizers import SentencePieceTokenizer

if path_to_tokenizer is None:
Expand Down
3 changes: 3 additions & 0 deletions nemo_curator/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# 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.
import os

os.environ["TORCHINDUCTOR_COMPILE_THREADS"] = "1"

from .add_id import AddId
from .exact_dedup import ExactDuplicates
Expand Down

0 comments on commit 3592977

Please sign in to comment.