mirror of
				https://github.com/hiyouga/LLaMA-Factory.git
				synced 2025-11-04 09:52:14 +08:00 
			
		
		
		
	
							parent
							
								
									304796b803
								
							
						
					
					
						commit
						3aa4f32e9c
					
				
							
								
								
									
										16
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							@ -22,7 +22,7 @@ jobs:
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        python-version:
 | 
			
		||||
        python:
 | 
			
		||||
          - "3.9"
 | 
			
		||||
          - "3.10"
 | 
			
		||||
          - "3.11"
 | 
			
		||||
@ -34,6 +34,10 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
 | 
			
		||||
    concurrency:
 | 
			
		||||
      group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }}
 | 
			
		||||
      cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
 | 
			
		||||
 | 
			
		||||
    env:
 | 
			
		||||
      HF_TOKEN: ${{ secrets.HF_TOKEN }}
 | 
			
		||||
      OS_NAME: ${{ matrix.os }}
 | 
			
		||||
@ -45,7 +49,7 @@ jobs:
 | 
			
		||||
      - name: Set up Python
 | 
			
		||||
        uses: actions/setup-python@v5
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: ${{ matrix.python-version }}
 | 
			
		||||
          python-version: ${{ matrix.python }}
 | 
			
		||||
          cache: "pip"
 | 
			
		||||
          cache-dependency-path: "setup.py"
 | 
			
		||||
 | 
			
		||||
@ -54,6 +58,12 @@ jobs:
 | 
			
		||||
          python -m pip install --upgrade pip
 | 
			
		||||
          python -m pip install ".[torch,dev]"
 | 
			
		||||
 | 
			
		||||
      - name: Cache files
 | 
			
		||||
        uses: actions/cache@v4
 | 
			
		||||
        with:
 | 
			
		||||
          path: ${{ runner.temp }}/huggingface
 | 
			
		||||
          key: huggingface-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('tests/version.txt') }}
 | 
			
		||||
 | 
			
		||||
      - name: Check quality
 | 
			
		||||
        run: |
 | 
			
		||||
          make style && make quality
 | 
			
		||||
@ -65,3 +75,5 @@ jobs:
 | 
			
		||||
      - name: Test with pytest
 | 
			
		||||
        run: |
 | 
			
		||||
          make test
 | 
			
		||||
        env:
 | 
			
		||||
          HF_HOME: ${{ runner.temp }}/huggingface
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
transformers>=4.41.2,<=4.50.0,!=4.46.*,!=4.47.*,!=4.48.*;python_version<'3.10'
 | 
			
		||||
transformers>=4.41.2,<=4.50.0,!=4.46.*,!=4.47.*,!=4.48.0;python_version>='3.10'
 | 
			
		||||
transformers>=4.41.2,<=4.50.0,!=4.46.*,!=4.47.*,!=4.48.*;python_version<'3.10' and sys_platform != 'darwin'
 | 
			
		||||
transformers>=4.41.2,<=4.50.0,!=4.46.*,!=4.47.*,!=4.48.0;python_version>='3.10' and sys_platform != 'darwin'
 | 
			
		||||
transformers>=4.41.2,<=4.49.0,!=4.46.*,!=4.47.*,!=4.48.*;sys_platform == 'darwin'
 | 
			
		||||
datasets>=2.16.0,<=3.3.2
 | 
			
		||||
accelerate>=0.34.0,<=1.4.0
 | 
			
		||||
peft>=0.11.1,<=0.12.0
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ KEYWORDS = ("Copyright", "2025", "LlamaFactory")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    path_list = []
 | 
			
		||||
    path_list: list[Path] = []
 | 
			
		||||
    for check_dir in sys.argv[1:]:
 | 
			
		||||
        path_list.extend(Path(check_dir).glob("**/*.py"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/version.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/version.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
0.9.3.100
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user