Skip to content

Commit

Permalink
isort fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
efajardo-nv committed Jan 18, 2024
1 parent e4f9646 commit 37d7ef8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ def generate_split_dataframes(users_df: pd.DataFrame):
if (include_individual):
# pylint: disable=unnecessary-comprehension
# List comprehension is necessary here to convert to a dictionary
split_dataframes.update(
{username: user_df
for username, user_df in users_df.groupby(userid_column_name, sort=False)})
split_dataframes.update({
username: user_df
for username, user_df in users_df.groupby(userid_column_name, sort=False)
})

return split_dataframes

Expand Down
6 changes: 3 additions & 3 deletions models/training-tuning-scripts/common/sequence_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@

import logging

import cudf
from cudf.core.subword_tokenizer import SubwordTokenizer
import cupy

import torch
from torch.optim import AdamW
from torch.utils.dlpack import to_dlpack
from tqdm import trange
from transformers import AutoModelForSequenceClassification

import cudf
from cudf.core.subword_tokenizer import SubwordTokenizer

from .dataloader import DataLoader
from .dataset import Dataset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
--output phishing-email-validation-output.jsonlines
"""

import argparse
import json

import numpy as np
import onnxruntime
import scipy
import torch

###########################################################################################
# cudf imports moved before torch import to avoid the following error:
# ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found
Expand All @@ -29,14 +37,6 @@

###########################################################################################

import argparse
import json

import numpy as np
import onnxruntime
import torch
import scipy


def infer(validationdata, vocab, model, output):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
--output root-cause-validation-output.jsonlines
"""

import argparse
import json

import numpy as np
import onnxruntime
import scipy
import torch

###########################################################################################
# cudf imports moved before torch import to avoid the following error:
# ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found
Expand All @@ -30,14 +38,6 @@

###########################################################################################

import argparse
import json

import numpy as np
import onnxruntime
import torch
import scipy


def infer(
validationdata,
Expand Down
7 changes: 4 additions & 3 deletions morpheus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# limitations under the License.
"""Root module for the Morpheus library."""

import logging
import os

# ########################### CVE-2023-47248 Mitigation ############################
# Import pyarrow_hotfix as early as possible to ensure that the pyarrow hotfix is applied before any code can use it
# Can be removed after upgrading to pyarrow 14.0.1 or later (which is dictated by cudf)
import pyarrow_hotfix
# ##################################################################################

import logging
import os
# ##################################################################################

# Create a default null logger to prevent log messages from being propagated to users of this library unless otherwise
# configured. Use the `utils.logging` module to configure Morpheus logging
Expand Down

0 comments on commit 37d7ef8

Please sign in to comment.