Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| dataset_id_hash = int(hashlib.md5(dataset_id_bytes).hexdigest()[:8], 16) % 10000 | ||
| dataset_id_bytes = str(dataset["id"]).encode("utf-8") | ||
| dataset_id_hash = ( | ||
| int(hashlib.md5(dataset_id_bytes).hexdigest()[:8], 16) % 10000 |
Check warning
Code scanning / Bandit
Use of insecure MD2, MD4, MD5, or SHA1 hash function. Warning
| results["metrics"][0]["y_ranges"] = y_ranges | ||
|
|
||
| num_categories = len(results["categories"][0]) | ||
| assert len(full_texts) == (len(results["data"]["x_test"]) * num_categories) |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
| # check that y is categorical and there is only one y column | ||
| assert len(self.y_column_names) == 1 | ||
| assert self.y_column_types[0] == 'categorical' | ||
| assert self.y_column_types[0] == "categorical" |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
| assert ( | ||
| len(feature_names) == num_features |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
| assert ( | ||
| abs(train_size + val_size + test_size - 1.0) < 1e-6 |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
| try: | ||
| # Load model from torch.hub | ||
| model = torch.hub.load('facebookresearch/dinov2', model_name, pretrained=True) | ||
| model = torch.hub.load("facebookresearch/dinov2", model_name, pretrained=True) |
Check warning
Code scanning / Bandit
Use of unsafe PyTorch load or save Warning
|
|
||
| # Load the embedding projector | ||
| embedding_projector_path = f"{pretrained_model_path}/embedding_projector.pt" | ||
| if os.path.exists(embedding_projector_path): | ||
| model.embedding_projector.load_state_dict(torch.load(embedding_projector_path)) | ||
| model.embedding_projector.load_state_dict( | ||
| torch.load(embedding_projector_path) |
Check warning
Code scanning / Bandit
Use of unsafe PyTorch load or save Warning
| torch.save( | ||
| model.state_dict(), os.path.join(checkpoint_path, "pytorch_model.bin") |
Check warning
Code scanning / Bandit
Use of unsafe PyTorch load or save Warning
| cache_dir.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| # Create a hash of the URL for the cache key | ||
| url_hash = hashlib.md5(url.encode()).hexdigest()[:16] |
Check warning
Code scanning / Bandit
Use of insecure MD2, MD4, MD5, or SHA1 hash function. Warning
| from tqdm import tqdm | ||
|
|
||
| # Download with progress bar | ||
| response = requests.get(download_url, stream=True) |
Check warning
Code scanning / Bandit
Call to requests without timeout Warning
| import os | ||
| import logging | ||
| import os | ||
| import pickle |
Check notice
Code scanning / Bandit
Consider possible security implications associated with pickle module. Note
| from parse_args import parse_command_line | ||
| import contextlib | ||
| import os | ||
| import pickle |
Check notice
Code scanning / Bandit
Consider possible security implications associated with pickle module. Note
| import random | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
| import random | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
| import random | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
examples/tabular/openml_regression_2025/run_openml_regression_2025_llm_baselines_tabular.py
Fixed
Show fixed
Hide fixed
| import random | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
| import logging | ||
| import os | ||
| import random | ||
| import shutil | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
| import time | ||
| from datetime import datetime | ||
| from tqdm import tqdm | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
| import time | ||
| from datetime import datetime | ||
| from tqdm import tqdm | ||
| import subprocess |
Check notice
Code scanning / Bandit
Consider possible security implications associated with the subprocess module. Note
No description provided.