Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
from contextlib import contextmanager
from functools import lru_cache
from typing import Any, Dict, Optional
from typing import Any

# Third-party imports
import streamlit as st
Expand Down Expand Up @@ -292,25 +292,25 @@ def run(self) -> None:
"""Run the application with improved error boundaries and state management"""
try:
self.setup_sidebar()

# Enhanced header with visual appeal
st.markdown(
"""
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 2rem;
border-radius: 16px;
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 2rem;
border-radius: 16px;
margin-bottom: 2rem;
box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);">
<h1 style="color: white;
margin: 0;
<h1 style="color: white;
margin: 0;
text-align: center;
font-size: 2.5rem;
text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
-webkit-text-fill-color: white;">
🚀 ML Model Fine-tuning Platform
</h1>
<p style="color: rgba(255, 255, 255, 0.9);
text-align: center;
<p style="color: rgba(255, 255, 255, 0.9);
text-align: center;
margin-top: 0.5rem;
font-size: 1.1rem;">
Advanced training and optimization for machine learning models
Expand Down
2 changes: 1 addition & 1 deletion components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"plugin_manager",
"tokenizer_builder",
"training_monitor",
]
]
2 changes: 0 additions & 2 deletions components/dataset_selector.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging
import re
from functools import lru_cache
from typing import Dict, Optional

import streamlit as st
from datasets import load_dataset

from utils.argilla_dataset import ArgillaDatasetManager

Expand Down
1 change: 0 additions & 1 deletion components/documentation_viewer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
from typing import Dict, List

import streamlit as st

Expand Down
11 changes: 4 additions & 7 deletions components/loading_animation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import time
from typing import Optional

import streamlit as st


Expand Down Expand Up @@ -128,24 +125,24 @@ def show_training_animation(progress: float | None = None) -> None:
# Display emoji and progress
progress_display = progress * 100 if progress is not None else 0
progress_deg = progress_display * 3.6 if progress is not None else 0

st.markdown(
f"""
<div class="training-container">
<div class="training-emoji">🤖</div>
<div class="training-emoji">⚡</div>
<div class="training-emoji">🚀</div>

<div class="progress-circle" style="--progress: {progress_deg}deg;">
<div class="progress-inner">
{progress_display:.1f}%
</div>
</div>

<div class="training-message">
Training in Progress...
</div>

<div class="training-stats">
<div class="stat-item">
<div>Progress</div>
Expand Down
3 changes: 0 additions & 3 deletions components/model_export.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import os

import streamlit as st
import torch
from huggingface_hub import HfApi, create_repo
from transformers import AutoModelForCausalLM, AutoTokenizer

Expand Down
2 changes: 1 addition & 1 deletion components/parameter_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any, Dict, Optional
from typing import Any

import streamlit as st

Expand Down
1 change: 0 additions & 1 deletion components/plugin_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from typing import Any, Dict

import streamlit as st

Expand Down
2 changes: 1 addition & 1 deletion components/training_monitor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from concurrent.futures import ThreadPoolExecutor
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
from typing import TYPE_CHECKING, Any

import numpy as np
import plotly.graph_objects as go
Expand Down
2 changes: 1 addition & 1 deletion plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Plugins are dynamically loaded by the registry
# This file marks the directory as a Python package

__all__ = []
__all__ = []
Binary file not shown.
2 changes: 1 addition & 1 deletion plugins/anthropic_code_suggester.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import os
from typing import Any, Dict
from typing import Any

from anthropic import Anthropic

Expand Down
2 changes: 1 addition & 1 deletion plugins/code_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ast
from typing import Any, Dict, List
from typing import Any

from utils.plugins.base import AgentTool, ToolMetadata

Expand Down
2 changes: 1 addition & 1 deletion plugins/openai_code_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import os
from typing import Any, Dict
from typing import Any

from openai import OpenAI

Expand Down
2 changes: 1 addition & 1 deletion utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"TrainingConfig",
"TrainingMetric",
"db",
]
]
2 changes: 1 addition & 1 deletion utils/argilla_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import os
from typing import Any, Dict, List, Optional
from typing import Any

import argilla as rg
from datasets import Dataset
Expand Down
2 changes: 1 addition & 1 deletion utils/config_validator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import re
from typing import Any, Dict, List, Union
from typing import Any

# Configure logging
logging.basicConfig(
Expand Down
2 changes: 1 addition & 1 deletion utils/distributed_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import os
from contextlib import contextmanager
from typing import Any, Dict, Optional
from typing import Any

import torch
import torch.distributed as dist
Expand Down
3 changes: 1 addition & 2 deletions utils/documentation.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import ast
import inspect
import logging
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, List, Optional
from typing import Any

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion utils/model_inference.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from typing import Any

import torch
from accelerate import init_empty_weights
Expand Down
2 changes: 1 addition & 1 deletion utils/model_versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import os
from datetime import datetime
from typing import Any, Dict, Optional
from typing import Any


class ModelVersion:
Expand Down
2 changes: 1 addition & 1 deletion utils/peft_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from contextlib import contextmanager
from typing import Any, Dict, Optional, Union
from typing import Any

import torch
from peft import (
Expand Down
2 changes: 1 addition & 1 deletion utils/plugins/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional
from typing import Any

# Configure logging
logging.basicConfig(level=logging.INFO)
Expand Down
2 changes: 0 additions & 2 deletions utils/plugins/registry.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import importlib.util
import inspect
import logging
import os
import sys
from pathlib import Path
from typing import Dict, List, Optional, Type

from .base import AgentTool

Expand Down
4 changes: 1 addition & 3 deletions utils/reddit_dataset.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import logging
import os
import random
from datetime import datetime
from functools import lru_cache
from typing import Any, Dict, List, Optional, Tuple
from typing import Any

import numpy as np
import torch
from datasets import load_dataset
from tqdm import tqdm

Expand Down
Loading