Skip to content
74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file looks like it's setting up some sort of post commit hook or something?
It this meant to be part of this PR? It doesn't seem related to the example updates.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t add this file when I do git add and git commit. It was autogenerated. The first two lines of that file say that it just needs to be committed into my repository. I created this branch from the main branch. Should I try to remove it?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main branch has this file, but none of the release branches do.
I don't have a ton of experience with github workflows, so I don't know what the consequences are of this file right now.
Did you create your branch off main or off the 2.7.x branch that you're targeting? From the commit list, it looks like you're pulling in some changes to the main branch on top of the changes you directly made to the docs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the branch off main branch. But now targeting 2.7.x. I think that is the issues comes from. Let me fix it.

# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '40 11 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ To connect to the existing session use the `%use_session` magic command.

.. code-block:: python

%use_session -s "<application_id>"
%use_session -s <application_id>


Basic Spark Usage Examples
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/model_registration/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ Create a model, prepare it, verify that it works, save it to the model catalog,
artifact_dir=tempfile.mkdtemp()
torch_model = PyTorchModel(torch_estimator, artifact_dir=artifact_dir)

# Autogenerate score.py, pickled model, runtime.yaml, input_schema.json and output_schema.json
# Set `save_entire_model` to `True` to save the model as Torchscript program.
# Autogenerate score.py, serialized model, runtime.yaml
# Set `use_torch_script` to `True` to save the model as Torchscript program.
torch_model.prepare(inference_conda_env="pytorch110_p38_cpu_v1", use_torch_script=True)

# Verify generated artifacts
Expand Down