Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course 1.6 feedback #110

Open
programlich opened this issue Oct 23, 2024 · 5 comments
Open

Course 1.6 feedback #110

programlich opened this issue Oct 23, 2024 · 5 comments

Comments

@programlich
Copy link

I just finished the Course 1.6 assignment. The codespaces did not work, but the scripts ran fine and produced the expected output. Was quite fun, to put the pieces together!

A few things I noticed on my way:

  • In the microcontroller.py the import ussl did not work. I replaced it with import ssl and the issue was solved
  • In the import from my secrets in this course there are four new variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, DYNAMODB_TABLE_NAME. These are either new or have a different name compared to Course 1.5. As far as I can see, the last two variables are not necessary
  • A general thing, that still confuses me, is the structure of messages being sent via AWS. I still dont get, how exactly they are composed of several layers of json/string/whatever and when I have to manually add the keyword argument body and when this is automatically added. Sorry, if I´m a bit dumb here, just wanted to let you know, that this can cause confusion to a newcomer
  • One major takeaway from module 1.6 was, that the data collected by the sensor cannot be easily transformed to RGB values. Knowing this, the whole process of optimization makes a lot more sense to me. It might be worth pointing this fact out somewhere in the course.
@programlich
Copy link
Author

To visualize the progress of optimization, I wrote some lines which result in a plot, where this process is graphically visualized:

import plotly.graph_objs as go

def extract_color_value(color, row):
    color_string = row["command"].replace("'", "\"")
    color_dict = json.loads(color_string)
    return color_dict[color]

df = pd.read_csv("results.csv")

df["R"] = df.apply(lambda row: extract_color_value("R", row), axis=1)
df["G"] = df.apply(lambda row: extract_color_value("G", row), axis=1)
df["B"] = df.apply(lambda row: extract_color_value("B", row), axis=1)
target_df = df.loc[df["experiment_id"] == "target", :]

df = df.loc[df["experiment_id"] != "target",:]
df.rename(columns={"Unnamed: 0": "Trial"}, inplace=True)

fig = px.scatter_3d(df, x="R", y="G", z="B", color="Trial")
fig.add_trace(
    go.Scatter3d(
        x=target_df["R"],
        y=target_df["G"],
        z=target_df["B"],
        marker={"size":10,
                "symbol":"diamond"},

        name="Target",
        showlegend=True
                )
            )

fig.update_layout(
    legend=dict(
        x=0.02,  # Horizontal position of the legend
        y=0.98,  # Vertical position of the legend
        bgcolor="rgba(255, 255, 255, 0.7)"  # Optional: add a white background with some transparency
    ),
    coloraxis_colorbar=dict(
        x=0.85  # Move the color bar further to the right to prevent overlap
    )
)

image

@SissiFeng SissiFeng transferred this issue from AccelerationConsortium/ac-training-lab Oct 24, 2024
@sgbaird
Copy link
Member

sgbaird commented Oct 24, 2024

In the microcontroller.py the import ussl did not work. I replaced it with import ssl and the issue was solved

That's a leftover artifact that was addressed in some other modules, but I must have missed for this one. Thanks for catching!

EDIT: changed import line to:

try:
    import ussl
except:
    import ssl

This won't reflect on yours specifically (you already figured it out, so no need for me to go in and change), but it should be correct for future users.

In the import from my secrets in this course there are four new variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, DYNAMODB_TABLE_NAME. These are either new or have a different name compared to Course 1.5. As far as I can see, the last two variables are not necessary

@SissiFeng could you address? (should be a quick fix I think)

  • A general thing, that still confuses me, is the structure of messages being sent via AWS. I still dont get, how exactly they are composed of several layers of json/string/whatever and when I have to manually add the keyword argument body and when this is automatically added. Sorry, if I´m a bit dumb here, just wanted to let you know, that this can cause confusion to a newcomer

Thanks for the feedback. Maybe next week @SissiFeng we can record a walkthrough video of the AWS + MongoDB process and also consider moving the AWS/MongoDB integration to course 4? At least, let's chat about how we want to address #108

  • One major takeaway from module 1.6 was, that the data collected by the sensor cannot be easily transformed to RGB values. Knowing this, the whole process of optimization makes a lot more sense to me. It might be worth pointing this fact out somewhere in the course.

Great point! Any ideas for where this could be pointed out? I think this has been brought up a couple other times, definitely worth providing some more clarification early on. Maybe as a "tip/note" in Module 1 in Q&A format

@programlich
Copy link
Author

Great point! Any ideas for where this could be pointed out? I think this has been brought up a couple other times, definitely worth providing some more clarification early on. Maybe as a "tip/note" in Module 1 in Q&A format

I would point that out rather in the beginning of the course, to clarify the overall goal of the self driving lab. Maybe a little graphics like this sketch could help? Just an idea

image

@SissiFeng
Copy link
Contributor

I revised the assignment md document. Okay, I think recording a video would be a most direct and effective way to do this.

@kelvinchow23
Copy link

i think i finished the course but couldn't get it to run the autograding. some notes:

  • is there an extra } in the devcontainer.json file? removing that and rebuilding the container seemed to get the codespaces running.

  • this is the error i get when the autograding tries to run. I don't know what this error is.
    image

  • i'm just going to throw this here that when i run pytest, i feel like i pass enough tests that I can get over 70% to pass the course if the autograding runs
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants